253 __ bind(_entry);
254 // Move address of the BasicObjectLock into Z_R1_scratch.
255 if (_compute_lock) {
256 // Lock_reg was destroyed by fast unlocking attempt => recompute it.
257 ce->monitor_address(_monitor_ix, FrameMap::as_opr(Z_R1_scratch));
258 } else {
259 __ lgr_if_needed(Z_R1_scratch, _lock_reg->as_register());
260 }
261 // Note: non-blocking leaf routine => no call info needed.
262 Runtime1::StubID exit_id;
263 if (ce->compilation()->has_fpu_code()) {
264 exit_id = Runtime1::monitorexit_id;
265 } else {
266 exit_id = Runtime1::monitorexit_nofpu_id;
267 }
268 ce->emit_call_c(Runtime1::entry_for (exit_id));
269 CHECK_BAILOUT();
270 __ branch_optimized(Assembler::bcondAlways, _continuation);
271 }
272
273 // Implementation of patching:
274 // - Copy the code at given offset to an inlined buffer (first the bytes, then the number of bytes).
275 // - Replace original code with a call to the stub.
276 // At Runtime:
277 // - call to stub, jump to runtime.
278 // - in runtime: Preserve all registers (especially objects, i.e., source and destination object).
279 // - in runtime: After initializing class, restore original code, reexecute instruction.
280
281 int PatchingStub::_patch_info_offset = - (12 /* load const */ + 2 /*BASR*/);
282
283 void PatchingStub::align_patch_site(MacroAssembler* masm) {
284 #ifndef PRODUCT
285 const char* bc;
286 switch (_id) {
287 case access_field_id: bc = "patch site (access_field)"; break;
288 case load_klass_id: bc = "patch site (load_klass)"; break;
289 case load_mirror_id: bc = "patch site (load_mirror)"; break;
290 case load_appendix_id: bc = "patch site (load_appendix)"; break;
291 default: bc = "patch site (unknown patch id)"; break;
292 }
|
253 __ bind(_entry);
254 // Move address of the BasicObjectLock into Z_R1_scratch.
255 if (_compute_lock) {
256 // Lock_reg was destroyed by fast unlocking attempt => recompute it.
257 ce->monitor_address(_monitor_ix, FrameMap::as_opr(Z_R1_scratch));
258 } else {
259 __ lgr_if_needed(Z_R1_scratch, _lock_reg->as_register());
260 }
261 // Note: non-blocking leaf routine => no call info needed.
262 Runtime1::StubID exit_id;
263 if (ce->compilation()->has_fpu_code()) {
264 exit_id = Runtime1::monitorexit_id;
265 } else {
266 exit_id = Runtime1::monitorexit_nofpu_id;
267 }
268 ce->emit_call_c(Runtime1::entry_for (exit_id));
269 CHECK_BAILOUT();
270 __ branch_optimized(Assembler::bcondAlways, _continuation);
271 }
272
273 void LoadKlassStub::emit_code(LIR_Assembler* ce) {
274 Unimplemented(); // Only needed with compact object headers.
275 }
276
277 // Implementation of patching:
278 // - Copy the code at given offset to an inlined buffer (first the bytes, then the number of bytes).
279 // - Replace original code with a call to the stub.
280 // At Runtime:
281 // - call to stub, jump to runtime.
282 // - in runtime: Preserve all registers (especially objects, i.e., source and destination object).
283 // - in runtime: After initializing class, restore original code, reexecute instruction.
284
285 int PatchingStub::_patch_info_offset = - (12 /* load const */ + 2 /*BASR*/);
286
287 void PatchingStub::align_patch_site(MacroAssembler* masm) {
288 #ifndef PRODUCT
289 const char* bc;
290 switch (_id) {
291 case access_field_id: bc = "patch site (access_field)"; break;
292 case load_klass_id: bc = "patch site (load_klass)"; break;
293 case load_mirror_id: bc = "patch site (load_mirror)"; break;
294 case load_appendix_id: bc = "patch site (load_appendix)"; break;
295 default: bc = "patch site (unknown patch id)"; break;
296 }
|