< prev index next >

src/hotspot/cpu/ppc/c1_CodeStubs_ppc.cpp

Print this page

302   __ bctrl();
303   ce->add_call_info_here(_info);
304   ce->verify_oop_map(_info);
305   __ b(_continuation);
306 }
307 
308 void MonitorExitStub::emit_code(LIR_Assembler* ce) {
309   __ bind(_entry);
310   if (_compute_lock) {
311     ce->monitor_address(_monitor_ix, _lock_reg);
312   }
313   address stub = Runtime1::entry_for(ce->compilation()->has_fpu_code() ? Runtime1::monitorexit_id : Runtime1::monitorexit_nofpu_id);
314   //__ load_const_optimized(R0, stub);
315   __ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(stub));
316   assert(_lock_reg->as_register() == R4_ARG2, "");
317   __ mtctr(R0);
318   __ bctrl();
319   __ b(_continuation);
320 }
321 




322 
323 // Implementation of patching:
324 // - Copy the code at given offset to an inlined buffer (first the bytes, then the number of bytes).
325 // - Replace original code with a call to the stub.
326 // At Runtime:
327 // - call to stub, jump to runtime
328 // - in runtime: preserve all registers (especially objects, i.e., source and destination object)
329 // - in runtime: after initializing class, restore original code, reexecute instruction
330 
331 int PatchingStub::_patch_info_offset = -(5 * BytesPerInstWord);
332 
333 void PatchingStub::align_patch_site(MacroAssembler* ) {
334   // Patch sites on ppc are always properly aligned.
335 }
336 
337 #ifdef ASSERT
338 inline void compare_with_patch_site(address template_start, address pc_start, int bytes_to_copy) {
339   address start = template_start;
340   for (int i = 0; i < bytes_to_copy; i++) {
341     address ptr = (address)(pc_start + i);

302   __ bctrl();
303   ce->add_call_info_here(_info);
304   ce->verify_oop_map(_info);
305   __ b(_continuation);
306 }
307 
308 void MonitorExitStub::emit_code(LIR_Assembler* ce) {
309   __ bind(_entry);
310   if (_compute_lock) {
311     ce->monitor_address(_monitor_ix, _lock_reg);
312   }
313   address stub = Runtime1::entry_for(ce->compilation()->has_fpu_code() ? Runtime1::monitorexit_id : Runtime1::monitorexit_nofpu_id);
314   //__ load_const_optimized(R0, stub);
315   __ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(stub));
316   assert(_lock_reg->as_register() == R4_ARG2, "");
317   __ mtctr(R0);
318   __ bctrl();
319   __ b(_continuation);
320 }
321 
322 void LoadKlassStub::emit_code(LIR_Assembler* ce) {
323   // Currently not needed.
324   Unimplemented();
325 }
326 
327 // Implementation of patching:
328 // - Copy the code at given offset to an inlined buffer (first the bytes, then the number of bytes).
329 // - Replace original code with a call to the stub.
330 // At Runtime:
331 // - call to stub, jump to runtime
332 // - in runtime: preserve all registers (especially objects, i.e., source and destination object)
333 // - in runtime: after initializing class, restore original code, reexecute instruction
334 
335 int PatchingStub::_patch_info_offset = -(5 * BytesPerInstWord);
336 
337 void PatchingStub::align_patch_site(MacroAssembler* ) {
338   // Patch sites on ppc are always properly aligned.
339 }
340 
341 #ifdef ASSERT
342 inline void compare_with_patch_site(address template_start, address pc_start, int bytes_to_copy) {
343   address start = template_start;
344   for (int i = 0; i < bytes_to_copy; i++) {
345     address ptr = (address)(pc_start + i);
< prev index next >