comparison src/share/vm/adlc/forms.cpp @ 624:337400e7a5dd

6797305: Add LoadUB and LoadUI opcode class Summary: Add a LoadUB (unsigned byte) and LoadUI (unsigned int) opcode class so we have these load optimizations in the first place and do not need to handle them in the matcher. Reviewed-by: never, kvn
author twisti
date Mon, 09 Mar 2009 03:17:11 -0700
parents dbbe28fc66b5
children 7bb995fbd3c0
comparison
equal deleted inserted replaced
623:9adddb8c0fc8 624:337400e7a5dd
68 const char *NameList::iter() { 68 const char *NameList::iter() {
69 if (_justReset) {_justReset=false; return (_iter < _cur ? _names[_iter] : NULL);} 69 if (_justReset) {_justReset=false; return (_iter < _cur ? _names[_iter] : NULL);}
70 else return (_iter <_cur-1 ? _names[++_iter] : NULL); 70 else return (_iter <_cur-1 ? _names[++_iter] : NULL);
71 } 71 }
72 const char *NameList::current() { return (_iter < _cur ? _names[_iter] : NULL); } 72 const char *NameList::current() { return (_iter < _cur ? _names[_iter] : NULL); }
73 const char *NameList::peek(int skip) { return (_iter + skip < _cur ? _names[_iter + skip] : NULL); }
73 74
74 // Return 'true' if current entry is signal 75 // Return 'true' if current entry is signal
75 bool NameList::current_is_signal() { 76 bool NameList::current_is_signal() {
76 const char *entry = current(); 77 const char *entry = current();
77 return is_signal(entry); 78 return is_signal(entry);
246 } 247 }
247 248
248 // True if 'opType', an ideal name, loads or stores. 249 // True if 'opType', an ideal name, loads or stores.
249 Form::DataType Form::is_load_from_memory(const char *opType) const { 250 Form::DataType Form::is_load_from_memory(const char *opType) const {
250 if( strcmp(opType,"LoadB")==0 ) return Form::idealB; 251 if( strcmp(opType,"LoadB")==0 ) return Form::idealB;
252 if( strcmp(opType,"LoadUB")==0 ) return Form::idealB;
251 if( strcmp(opType,"LoadUS")==0 ) return Form::idealC; 253 if( strcmp(opType,"LoadUS")==0 ) return Form::idealC;
252 if( strcmp(opType,"LoadD")==0 ) return Form::idealD; 254 if( strcmp(opType,"LoadD")==0 ) return Form::idealD;
253 if( strcmp(opType,"LoadD_unaligned")==0 ) return Form::idealD; 255 if( strcmp(opType,"LoadD_unaligned")==0 ) return Form::idealD;
254 if( strcmp(opType,"LoadF")==0 ) return Form::idealF; 256 if( strcmp(opType,"LoadF")==0 ) return Form::idealF;
255 if( strcmp(opType,"LoadI")==0 ) return Form::idealI; 257 if( strcmp(opType,"LoadI")==0 ) return Form::idealI;
258 if( strcmp(opType,"LoadUI2L")==0 ) return Form::idealI;
256 if( strcmp(opType,"LoadKlass")==0 ) return Form::idealP; 259 if( strcmp(opType,"LoadKlass")==0 ) return Form::idealP;
257 if( strcmp(opType,"LoadNKlass")==0 ) return Form::idealN; 260 if( strcmp(opType,"LoadNKlass")==0 ) return Form::idealN;
258 if( strcmp(opType,"LoadL")==0 ) return Form::idealL; 261 if( strcmp(opType,"LoadL")==0 ) return Form::idealL;
259 if( strcmp(opType,"LoadL_unaligned")==0 ) return Form::idealL; 262 if( strcmp(opType,"LoadL_unaligned")==0 ) return Form::idealL;
260 if( strcmp(opType,"LoadPLocked")==0 ) return Form::idealP; 263 if( strcmp(opType,"LoadPLocked")==0 ) return Form::idealP;