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 // Currently not needed.
275 Unimplemented();
276 }
277
278 // Implementation of patching:
279 // - Copy the code at given offset to an inlined buffer (first the bytes, then the number of bytes).
280 // - Replace original code with a call to the stub.
281 // At Runtime:
282 // - call to stub, jump to runtime.
283 // - in runtime: Preserve all registers (especially objects, i.e., source and destination object).
284 // - in runtime: After initializing class, restore original code, reexecute instruction.
285
286 int PatchingStub::_patch_info_offset = - (12 /* load const */ + 2 /*BASR*/);
287
288 void PatchingStub::align_patch_site(MacroAssembler* masm) {
289 #ifndef PRODUCT
290 const char* bc;
291 switch (_id) {
292 case access_field_id: bc = "patch site (access_field)"; break;
293 case load_klass_id: bc = "patch site (load_klass)"; break;
294 case load_mirror_id: bc = "patch site (load_mirror)"; break;
295 case load_appendix_id: bc = "patch site (load_appendix)"; break;
296 default: bc = "patch site (unknown patch id)"; break;
297 }
|