< prev index next >

src/hotspot/cpu/aarch64/c2_CodeStubs_aarch64.cpp

Print this page

51 
52 int C2EntryBarrierStub::max_size() const {
53   return 24;
54 }
55 
56 void C2EntryBarrierStub::emit(C2_MacroAssembler& masm) {
57   __ bind(entry());
58   __ lea(rscratch1, RuntimeAddress(StubRoutines::method_entry_barrier()));
59   __ blr(rscratch1);
60   __ b(continuation());
61 
62   __ bind(guard());
63   __ relocate(entry_guard_Relocation::spec());
64   __ emit_int32(0);   // nmethod guard value
65 }
66 
67 int C2HandleAnonOMOwnerStub::max_size() const {
68   // Max size of stub has been determined by testing with 0, in which case
69   // C2CodeStubList::emit() will throw an assertion and report the actual size that
70   // is needed.
71   return 24;
72 }
73 
74 void C2HandleAnonOMOwnerStub::emit(C2_MacroAssembler& masm) {
75   __ bind(entry());
76   Register mon = monitor();
77   Register t = tmp();
78   assert(t != noreg, "need tmp register");
79 
80   // Fix owner to be the current thread.
81   __ str(rthread, Address(mon, ObjectMonitor::owner_offset()));
82 
83   // Pop owner object from lock-stack.
84   __ ldrw(t, Address(rthread, JavaThread::lock_stack_top_offset()));
85   __ subw(t, t, oopSize);
86 #ifdef ASSERT
87   __ str(zr, Address(rthread, t));
88 #endif
89   __ strw(t, Address(rthread, JavaThread::lock_stack_top_offset()));
90 












91   __ b(continuation());
92 }
93 
94 #undef __

51 
52 int C2EntryBarrierStub::max_size() const {
53   return 24;
54 }
55 
56 void C2EntryBarrierStub::emit(C2_MacroAssembler& masm) {
57   __ bind(entry());
58   __ lea(rscratch1, RuntimeAddress(StubRoutines::method_entry_barrier()));
59   __ blr(rscratch1);
60   __ b(continuation());
61 
62   __ bind(guard());
63   __ relocate(entry_guard_Relocation::spec());
64   __ emit_int32(0);   // nmethod guard value
65 }
66 
67 int C2HandleAnonOMOwnerStub::max_size() const {
68   // Max size of stub has been determined by testing with 0, in which case
69   // C2CodeStubList::emit() will throw an assertion and report the actual size that
70   // is needed.
71   return 52;
72 }
73 
74 void C2HandleAnonOMOwnerStub::emit(C2_MacroAssembler& masm) {
75   __ bind(entry());
76   Register mon = monitor();
77   Register t = tmp();
78   assert(t != noreg, "need tmp register");
79 
80   // Fix owner to be the current thread.
81   __ ldr(t, Address(rthread, JavaThread::lock_id_offset()));
82   __ str(t, Address(mon, ObjectMonitor::owner_offset()));







83 
84   if (LockingMode == LM_LIGHTWEIGHT) {
85     // Pop owner object from lock-stack.
86     __ ldrw(t, Address(rthread, JavaThread::lock_stack_top_offset()));
87     __ subw(t, t, oopSize);
88   #ifdef ASSERT
89     __ str(zr, Address(rthread, t));
90   #endif
91     __ strw(t, Address(rthread, JavaThread::lock_stack_top_offset()));
92   } else {
93     __ str(zr, Address(mon, ObjectMonitor::stack_locker_offset()));
94     __ dec_held_monitor_count();
95   }
96   __ b(continuation());
97 }
98 
99 #undef __
< prev index next >