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);
|
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 void LoadKlassStub::emit_code(LIR_Assembler* ce) {
302 // Currently not needed.
303 Unimplemented();
304 }
305
306 // Implementation of patching:
307 // - Copy the code at given offset to an inlined buffer (first the bytes, then the number of bytes).
308 // - Replace original code with a call to the stub.
309 // At Runtime:
310 // - call to stub, jump to runtime
311 // - in runtime: preserve all registers (especially objects, i.e., source and destination object)
312 // - in runtime: after initializing class, restore original code, reexecute instruction
313
314 int PatchingStub::_patch_info_offset = -(5 * BytesPerInstWord);
315
316 void PatchingStub::align_patch_site(MacroAssembler* ) {
317 // Patch sites on ppc are always properly aligned.
318 }
319
320 #ifdef ASSERT
321 inline void compare_with_patch_site(address template_start, address pc_start, int bytes_to_copy) {
322 address start = template_start;
323 for (int i = 0; i < bytes_to_copy; i++) {
324 address ptr = (address)(pc_start + i);
|