src/cpu/mips/vm/c1_CodeStubs_mips.cpp

changeset 9228
617b86d17edb
parent 9211
0205041afcbd
child 9231
714bb57e222b
equal deleted inserted replaced
9227:f1560009a081 9228:617b86d17edb
64 #endif // TIERED 64 #endif // TIERED
65 65
66 RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, 66 RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index,
67 bool throw_index_out_of_bounds_exception) 67 bool throw_index_out_of_bounds_exception)
68 : _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception) 68 : _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception)
69 , _index(index) 69 , _index(index)
70 { 70 {
71 _info = info == NULL ? NULL : new CodeEmitInfo(info); 71 _info = info == NULL ? NULL : new CodeEmitInfo(info);
72 } 72 }
73 73
74 74
148 assert(__ sp_offset() == 0, "frame size should be fixed"); 148 assert(__ sp_offset() == 0, "frame size should be fixed");
149 __ bind(_entry); 149 __ bind(_entry);
150 #ifndef _LP64 150 #ifndef _LP64
151 assert(_klass_reg->as_register() == T4, "klass_reg must in T4"); 151 assert(_klass_reg->as_register() == T4, "klass_reg must in T4");
152 #else 152 #else
153 //FIXME. in A4? aoqi
154 assert(_klass_reg->as_register() == A4, "klass_reg must in A4"); 153 assert(_klass_reg->as_register() == A4, "klass_reg must in A4");
155 #endif 154 #endif
156 __ call(Runtime1::entry_for(_stub_id), relocInfo::runtime_call_type); 155 __ call(Runtime1::entry_for(_stub_id), relocInfo::runtime_call_type);
157 __ delayed()->nop(); 156 __ delayed()->nop();
158 ce->add_call_info_here(_info); 157 ce->add_call_info_here(_info);
179 __ bind(_entry); 178 __ bind(_entry);
180 assert(_length->as_register() == T2, "length must in T2,"); 179 assert(_length->as_register() == T2, "length must in T2,");
181 #ifndef _LP64 180 #ifndef _LP64
182 assert(_klass_reg->as_register() == T4, "klass_reg must in T4"); 181 assert(_klass_reg->as_register() == T4, "klass_reg must in T4");
183 #else 182 #else
184 //FIXME. in A4? aoqi
185 assert(_klass_reg->as_register() == A4, "klass_reg must in A4"); 183 assert(_klass_reg->as_register() == A4, "klass_reg must in A4");
186 #endif 184 #endif
187 185
188 __ call(Runtime1::entry_for(Runtime1::new_type_array_id), relocInfo::runtime_call_type); 186 __ call(Runtime1::entry_for(Runtime1::new_type_array_id), relocInfo::runtime_call_type);
189 __ delayed()->nop(); 187 __ delayed()->nop();
243 if (ce->compilation()->has_fpu_code()) { 241 if (ce->compilation()->has_fpu_code()) {
244 enter_id = Runtime1::monitorenter_id; 242 enter_id = Runtime1::monitorenter_id;
245 } else { 243 } else {
246 enter_id = Runtime1::monitorenter_nofpu_id; 244 enter_id = Runtime1::monitorenter_nofpu_id;
247 } 245 }
248 //__ call(RuntimeAddress(Runtime1::entry_for(enter_id)));
249 __ call(Runtime1::entry_for(enter_id), relocInfo::runtime_call_type); 246 __ call(Runtime1::entry_for(enter_id), relocInfo::runtime_call_type);
250 __ delayed()->nop(); 247 __ delayed()->nop();
251 ce->add_call_info_here(_info); 248 ce->add_call_info_here(_info);
252 ce->verify_oop_map(_info); 249 ce->verify_oop_map(_info);
253 __ b_far(_continuation); 250 __ b_far(_continuation);
267 if (ce->compilation()->has_fpu_code()) { 264 if (ce->compilation()->has_fpu_code()) {
268 exit_id = Runtime1::monitorexit_id; 265 exit_id = Runtime1::monitorexit_id;
269 } else { 266 } else {
270 exit_id = Runtime1::monitorexit_nofpu_id; 267 exit_id = Runtime1::monitorexit_nofpu_id;
271 } 268 }
272 //__ call(RuntimeAddress(Runtime1::entry_for(exit_id)));
273 __ call(Runtime1::entry_for(exit_id), relocInfo::runtime_call_type); 269 __ call(Runtime1::entry_for(exit_id), relocInfo::runtime_call_type);
274 __ delayed()->nop(); 270 __ delayed()->nop();
275 271
276 __ b_far(_continuation); 272 __ b_far(_continuation);
277 __ delayed()->nop(); 273 __ delayed()->nop();
348 // make a copy the code which is going to be patched. 344 // make a copy the code which is going to be patched.
349 assert((_bytes_to_copy&3)==0, "change this code"); 345 assert((_bytes_to_copy&3)==0, "change this code");
350 address start = __ pc(); 346 address start = __ pc();
351 for ( int i = 0; i < _bytes_to_copy; i+=4) { 347 for ( int i = 0; i < _bytes_to_copy; i+=4) {
352 __ emit_int32(*(int*)(_pc_start + i)); 348 __ emit_int32(*(int*)(_pc_start + i));
353 //make the site look like a nop, @jerome 349 //make the site look like a nop
354 *(int*)(_pc_start + i)=0; 350 *(int*)(_pc_start + i)=0;
355 } 351 }
356 while ((intx)__ pc() - (intx)start < NativeCall::instruction_size) { 352 while ((intx)__ pc() - (intx)start < NativeCall::instruction_size) {
357 __ nop(); 353 __ nop();
358 } 354 }

mercurial