281 __ bctrl();
282 ce->add_call_info_here(_info);
283 ce->verify_oop_map(_info);
284 __ b(_continuation);
285 }
286
287 void MonitorExitStub::emit_code(LIR_Assembler* ce) {
288 __ bind(_entry);
289 if (_compute_lock) {
290 ce->monitor_address(_monitor_ix, _lock_reg);
291 }
292 address stub = Runtime1::entry_for(ce->compilation()->has_fpu_code() ? Runtime1::monitorexit_id : Runtime1::monitorexit_nofpu_id);
293 //__ load_const_optimized(R0, stub);
294 __ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(stub));
295 assert(_lock_reg->as_register() == R4_ARG2, "");
296 __ mtctr(R0);
297 __ bctrl();
298 __ b(_continuation);
299 }
300
301
302 // Implementation of patching:
303 // - Copy the code at given offset to an inlined buffer (first the bytes, then the number of bytes).
304 // - Replace original code with a call to the stub.
305 // At Runtime:
306 // - call to stub, jump to runtime
307 // - in runtime: preserve all registers (especially objects, i.e., source and destination object)
308 // - in runtime: after initializing class, restore original code, reexecute instruction
309
310 int PatchingStub::_patch_info_offset = -(5 * BytesPerInstWord);
311
312 void PatchingStub::align_patch_site(MacroAssembler* ) {
313 // Patch sites on ppc are always properly aligned.
314 }
315
316 #ifdef ASSERT
317 inline void compare_with_patch_site(address template_start, address pc_start, int bytes_to_copy) {
318 address start = template_start;
319 for (int i = 0; i < bytes_to_copy; i++) {
320 address ptr = (address)(pc_start + i);
321 int a_byte = (*ptr) & 0xFF;
|
281 __ bctrl();
282 ce->add_call_info_here(_info);
283 ce->verify_oop_map(_info);
284 __ b(_continuation);
285 }
286
287 void MonitorExitStub::emit_code(LIR_Assembler* ce) {
288 __ bind(_entry);
289 if (_compute_lock) {
290 ce->monitor_address(_monitor_ix, _lock_reg);
291 }
292 address stub = Runtime1::entry_for(ce->compilation()->has_fpu_code() ? Runtime1::monitorexit_id : Runtime1::monitorexit_nofpu_id);
293 //__ load_const_optimized(R0, stub);
294 __ add_const_optimized(R0, R29_TOC, MacroAssembler::offset_to_global_toc(stub));
295 assert(_lock_reg->as_register() == R4_ARG2, "");
296 __ mtctr(R0);
297 __ bctrl();
298 __ b(_continuation);
299 }
300
301 // Implementation of patching:
302 // - Copy the code at given offset to an inlined buffer (first the bytes, then the number of bytes).
303 // - Replace original code with a call to the stub.
304 // At Runtime:
305 // - call to stub, jump to runtime
306 // - in runtime: preserve all registers (especially objects, i.e., source and destination object)
307 // - in runtime: after initializing class, restore original code, reexecute instruction
308
309 int PatchingStub::_patch_info_offset = -(5 * BytesPerInstWord);
310
311 void PatchingStub::align_patch_site(MacroAssembler* ) {
312 // Patch sites on ppc are always properly aligned.
313 }
314
315 #ifdef ASSERT
316 inline void compare_with_patch_site(address template_start, address pc_start, int bytes_to_copy) {
317 address start = template_start;
318 for (int i = 0; i < bytes_to_copy; i++) {
319 address ptr = (address)(pc_start + i);
320 int a_byte = (*ptr) & 0xFF;
|