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