8341451: Remove C2HandleAnonOMOwnerStub
Reviewed-by: fyang, chagedorn
This commit is contained in:
parent
d3139b4c36
commit
3f420fac84
@ -64,31 +64,4 @@ void C2EntryBarrierStub::emit(C2_MacroAssembler& masm) {
|
||||
__ emit_int32(0); // nmethod guard value
|
||||
}
|
||||
|
||||
int C2HandleAnonOMOwnerStub::max_size() const {
|
||||
// Max size of stub has been determined by testing with 0, in which case
|
||||
// C2CodeStubList::emit() will throw an assertion and report the actual size that
|
||||
// is needed.
|
||||
return 24;
|
||||
}
|
||||
|
||||
void C2HandleAnonOMOwnerStub::emit(C2_MacroAssembler& masm) {
|
||||
__ bind(entry());
|
||||
Register mon = monitor();
|
||||
Register t = tmp();
|
||||
assert(t != noreg, "need tmp register");
|
||||
|
||||
// Fix owner to be the current thread.
|
||||
__ str(rthread, Address(mon, ObjectMonitor::owner_offset()));
|
||||
|
||||
// Pop owner object from lock-stack.
|
||||
__ ldrw(t, Address(rthread, JavaThread::lock_stack_top_offset()));
|
||||
__ subw(t, t, oopSize);
|
||||
#ifdef ASSERT
|
||||
__ str(zr, Address(rthread, t));
|
||||
#endif
|
||||
__ strw(t, Address(rthread, JavaThread::lock_stack_top_offset()));
|
||||
|
||||
__ b(continuation());
|
||||
}
|
||||
|
||||
#undef __
|
||||
|
@ -71,32 +71,4 @@ void C2EntryBarrierStub::emit(C2_MacroAssembler& masm) {
|
||||
__ emit_int32(0); // nmethod guard value
|
||||
}
|
||||
|
||||
int C2HandleAnonOMOwnerStub::max_size() const {
|
||||
// Max size of stub has been determined by testing with 0 without using RISC-V compressed
|
||||
// instruction-set extension, in which case C2CodeStubList::emit() will throw an assertion
|
||||
// and report the actual size that is needed.
|
||||
return 20 DEBUG_ONLY(+8);
|
||||
}
|
||||
|
||||
void C2HandleAnonOMOwnerStub::emit(C2_MacroAssembler& masm) {
|
||||
__ bind(entry());
|
||||
Register mon = monitor();
|
||||
Register t = tmp();
|
||||
assert(t != noreg, "need tmp register");
|
||||
|
||||
// Fix owner to be the current thread.
|
||||
__ sd(xthread, Address(mon, ObjectMonitor::owner_offset()));
|
||||
|
||||
// Pop owner object from lock-stack.
|
||||
__ lwu(t, Address(xthread, JavaThread::lock_stack_top_offset()));
|
||||
__ subw(t, t, oopSize);
|
||||
#ifdef ASSERT
|
||||
__ add(t0, xthread, t);
|
||||
__ sd(zr, Address(t0, 0));
|
||||
#endif
|
||||
__ sw(t, Address(xthread, JavaThread::lock_stack_top_offset()));
|
||||
|
||||
__ j(continuation());
|
||||
}
|
||||
|
||||
#undef __
|
||||
|
@ -117,21 +117,6 @@ public:
|
||||
Label& slow_path_continuation() { return continuation(); }
|
||||
};
|
||||
|
||||
#ifdef _LP64
|
||||
class C2HandleAnonOMOwnerStub : public C2CodeStub {
|
||||
private:
|
||||
Register _monitor;
|
||||
Register _tmp;
|
||||
public:
|
||||
C2HandleAnonOMOwnerStub(Register monitor, Register tmp = noreg) : C2CodeStub(),
|
||||
_monitor(monitor), _tmp(tmp) {}
|
||||
Register monitor() { return _monitor; }
|
||||
Register tmp() { return _tmp; }
|
||||
int max_size() const;
|
||||
void emit(C2_MacroAssembler& masm);
|
||||
};
|
||||
#endif
|
||||
|
||||
//-----------------------------C2GeneralStub-----------------------------------
|
||||
// A generalized stub that can be used to implement an arbitrary stub in a
|
||||
// type-safe manner. An example:
|
||||
|
Loading…
x
Reference in New Issue
Block a user