8341451: Remove C2HandleAnonOMOwnerStub

Reviewed-by: fyang, chagedorn
This commit is contained in:
Axel Boldt-Christmas 2024-10-04 06:55:53 +00:00
parent d3139b4c36
commit 3f420fac84
3 changed files with 0 additions and 70 deletions

View File

@ -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 __

View File

@ -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 __

View File

@ -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: