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