1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
249 // True if 'opType', an ideal name, loads or stores.
250 Form::DataType Form::is_load_from_memory(const char *opType) const {
251 if( strcmp(opType,"LoadB")==0 ) return Form::idealB;
252 if( strcmp(opType,"LoadUB")==0 ) return Form::idealB;
253 if( strcmp(opType,"LoadUS")==0 ) return Form::idealC;
254 if( strcmp(opType,"LoadD")==0 ) return Form::idealD;
255 if( strcmp(opType,"LoadD_unaligned")==0 ) return Form::idealD;
256 if( strcmp(opType,"LoadF")==0 ) return Form::idealF;
257 if( strcmp(opType,"LoadI")==0 ) return Form::idealI;
258 if( strcmp(opType,"LoadUI2L")==0 ) return Form::idealI;
259 if( strcmp(opType,"LoadKlass")==0 ) return Form::idealP;
260 if( strcmp(opType,"LoadNKlass")==0 ) return Form::idealN;
261 if( strcmp(opType,"LoadL")==0 ) return Form::idealL;
262 if( strcmp(opType,"LoadL_unaligned")==0 ) return Form::idealL;
263 if( strcmp(opType,"LoadPLocked")==0 ) return Form::idealP;
264 if( strcmp(opType,"LoadLLocked")==0 ) return Form::idealL;
265 if( strcmp(opType,"LoadP")==0 ) return Form::idealP;
266 if( strcmp(opType,"LoadN")==0 ) return Form::idealN;
267 if( strcmp(opType,"LoadRange")==0 ) return Form::idealI;
268 if( strcmp(opType,"LoadS")==0 ) return Form::idealS;
269 if( strcmp(opType,"Load16B")==0 ) return Form::idealB;
270 if( strcmp(opType,"Load8B")==0 ) return Form::idealB;
271 if( strcmp(opType,"Load4B")==0 ) return Form::idealB;
272 if( strcmp(opType,"Load8C")==0 ) return Form::idealC;
273 if( strcmp(opType,"Load4C")==0 ) return Form::idealC;
274 if( strcmp(opType,"Load2C")==0 ) return Form::idealC;
275 if( strcmp(opType,"Load8S")==0 ) return Form::idealS;
276 if( strcmp(opType,"Load4S")==0 ) return Form::idealS;
277 if( strcmp(opType,"Load2S")==0 ) return Form::idealS;
278 if( strcmp(opType,"Load2D")==0 ) return Form::idealD;
279 if( strcmp(opType,"Load4F")==0 ) return Form::idealF;
280 if( strcmp(opType,"Load2F")==0 ) return Form::idealF;
281 if( strcmp(opType,"Load4I")==0 ) return Form::idealI;
282 if( strcmp(opType,"Load2I")==0 ) return Form::idealI;
283 if( strcmp(opType,"Load2L")==0 ) return Form::idealL;
284 assert( strcmp(opType,"Load") != 0, "Must type Loads" );
285 return Form::none;
286 }
287
288 Form::DataType Form::is_store_to_memory(const char *opType) const {
289 if( strcmp(opType,"StoreB")==0) return Form::idealB;
290 if( strcmp(opType,"StoreCM")==0) return Form::idealB;
291 if( strcmp(opType,"StoreC")==0) return Form::idealC;
292 if( strcmp(opType,"StoreD")==0) return Form::idealD;
293 if( strcmp(opType,"StoreF")==0) return Form::idealF;
294 if( strcmp(opType,"StoreI")==0) return Form::idealI;
295 if( strcmp(opType,"StoreL")==0) return Form::idealL;
296 if( strcmp(opType,"StoreP")==0) return Form::idealP;
297 if( strcmp(opType,"StoreN")==0) return Form::idealN;
298 if( strcmp(opType,"Store16B")==0) return Form::idealB;
299 if( strcmp(opType,"Store8B")==0) return Form::idealB;
300 if( strcmp(opType,"Store4B")==0) return Form::idealB;
301 if( strcmp(opType,"Store8C")==0) return Form::idealC;
302 if( strcmp(opType,"Store4C")==0) return Form::idealC;
303 if( strcmp(opType,"Store2C")==0) return Form::idealC;
304 if( strcmp(opType,"Store2D")==0) return Form::idealD;
305 if( strcmp(opType,"Store4F")==0) return Form::idealF;
306 if( strcmp(opType,"Store2F")==0) return Form::idealF;
307 if( strcmp(opType,"Store4I")==0) return Form::idealI;
308 if( strcmp(opType,"Store2I")==0) return Form::idealI;
309 if( strcmp(opType,"Store2L")==0) return Form::idealL;
310 assert( strcmp(opType,"Store") != 0, "Must type Stores" );
311 return Form::none;
312 }
313
314 Form::InterfaceType Form::interface_type(FormDict &globals) const {
315 return Form::no_interface;
316 }
317
318 //------------------------------FormList---------------------------------------
319 // Destructor
320 FormList::~FormList() {
321 // // This list may not own its elements
322 // Form *cur = _root;
323 // Form *next = NULL;
324 // for( ; (cur = next) != NULL; ) {
325 // next = (Form *)cur->_next;
326 // delete cur;
327 // }
328 };
329
|
1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
249 // True if 'opType', an ideal name, loads or stores.
250 Form::DataType Form::is_load_from_memory(const char *opType) const {
251 if( strcmp(opType,"LoadB")==0 ) return Form::idealB;
252 if( strcmp(opType,"LoadUB")==0 ) return Form::idealB;
253 if( strcmp(opType,"LoadUS")==0 ) return Form::idealC;
254 if( strcmp(opType,"LoadD")==0 ) return Form::idealD;
255 if( strcmp(opType,"LoadD_unaligned")==0 ) return Form::idealD;
256 if( strcmp(opType,"LoadF")==0 ) return Form::idealF;
257 if( strcmp(opType,"LoadI")==0 ) return Form::idealI;
258 if( strcmp(opType,"LoadUI2L")==0 ) return Form::idealI;
259 if( strcmp(opType,"LoadKlass")==0 ) return Form::idealP;
260 if( strcmp(opType,"LoadNKlass")==0 ) return Form::idealN;
261 if( strcmp(opType,"LoadL")==0 ) return Form::idealL;
262 if( strcmp(opType,"LoadL_unaligned")==0 ) return Form::idealL;
263 if( strcmp(opType,"LoadPLocked")==0 ) return Form::idealP;
264 if( strcmp(opType,"LoadLLocked")==0 ) return Form::idealL;
265 if( strcmp(opType,"LoadP")==0 ) return Form::idealP;
266 if( strcmp(opType,"LoadN")==0 ) return Form::idealN;
267 if( strcmp(opType,"LoadRange")==0 ) return Form::idealI;
268 if( strcmp(opType,"LoadS")==0 ) return Form::idealS;
269 if( strcmp(opType,"LoadVector")==0 ) return Form::idealV;
270 assert( strcmp(opType,"Load") != 0, "Must type Loads" );
271 return Form::none;
272 }
273
274 Form::DataType Form::is_store_to_memory(const char *opType) const {
275 if( strcmp(opType,"StoreB")==0) return Form::idealB;
276 if( strcmp(opType,"StoreCM")==0) return Form::idealB;
277 if( strcmp(opType,"StoreC")==0) return Form::idealC;
278 if( strcmp(opType,"StoreD")==0) return Form::idealD;
279 if( strcmp(opType,"StoreF")==0) return Form::idealF;
280 if( strcmp(opType,"StoreI")==0) return Form::idealI;
281 if( strcmp(opType,"StoreL")==0) return Form::idealL;
282 if( strcmp(opType,"StoreP")==0) return Form::idealP;
283 if( strcmp(opType,"StoreN")==0) return Form::idealN;
284 if( strcmp(opType,"StoreVector")==0 ) return Form::idealV;
285 assert( strcmp(opType,"Store") != 0, "Must type Stores" );
286 return Form::none;
287 }
288
289 Form::InterfaceType Form::interface_type(FormDict &globals) const {
290 return Form::no_interface;
291 }
292
293 //------------------------------FormList---------------------------------------
294 // Destructor
295 FormList::~FormList() {
296 // // This list may not own its elements
297 // Form *cur = _root;
298 // Form *next = NULL;
299 // for( ; (cur = next) != NULL; ) {
300 // next = (Form *)cur->_next;
301 // delete cur;
302 // }
303 };
304
|