84
85 // We move non-hot code of the nmethod entry barrier to an out-of-line stub
86 class C2EntryBarrierStub: public C2CodeStub {
87 private:
88 Label _guard; // Used on AArch64 and RISCV
89
90 public:
91 C2EntryBarrierStub() : C2CodeStub(),
92 _guard() {}
93
94 Label& guard() { return _guard; }
95
96 int max_size() const;
97 void emit(C2_MacroAssembler& masm);
98 };
99
100 class C2FastUnlockLightweightStub : public C2CodeStub {
101 private:
102 Register _obj;
103 Register _mark;
104 Register _t;
105 Register _thread;
106 Label _push_and_slow_path;
107 Label _check_successor;
108 Label _unlocked_continuation;
109 public:
110 C2FastUnlockLightweightStub(Register obj, Register mark, Register t, Register thread) : C2CodeStub(),
111 _obj(obj), _mark(mark), _t(t), _thread(thread) {}
112 int max_size() const;
113 void emit(C2_MacroAssembler& masm);
114 Label& push_and_slow_path() { return _push_and_slow_path; }
115 Label& check_successor() { return _check_successor; }
116 Label& unlocked_continuation() { return _unlocked_continuation; }
117 Label& slow_path_continuation() { return continuation(); }
118 };
119
120 #ifdef _LP64
121 class C2HandleAnonOMOwnerStub : public C2CodeStub {
122 private:
123 Register _monitor;
124 Register _tmp;
125 public:
126 C2HandleAnonOMOwnerStub(Register monitor, Register tmp = noreg) : C2CodeStub(),
127 _monitor(monitor), _tmp(tmp) {}
128 Register monitor() { return _monitor; }
129 Register tmp() { return _tmp; }
130 int max_size() const;
131 void emit(C2_MacroAssembler& masm);
|
84
85 // We move non-hot code of the nmethod entry barrier to an out-of-line stub
86 class C2EntryBarrierStub: public C2CodeStub {
87 private:
88 Label _guard; // Used on AArch64 and RISCV
89
90 public:
91 C2EntryBarrierStub() : C2CodeStub(),
92 _guard() {}
93
94 Label& guard() { return _guard; }
95
96 int max_size() const;
97 void emit(C2_MacroAssembler& masm);
98 };
99
100 class C2FastUnlockLightweightStub : public C2CodeStub {
101 private:
102 Register _obj;
103 Register _mark;
104 Register _t1;
105 Register _t2;
106 Register _thread;
107 Label _push_and_slow_path;
108 Label _check_successor;
109 Label _unlocked_continuation;
110 public:
111 C2FastUnlockLightweightStub(Register obj, Register mark, Register t1, Register t2, Register thread) : C2CodeStub(),
112 _obj(obj), _mark(mark), _t1(t1), _t2(t2), _thread(thread) {}
113 int max_size() const;
114 void emit(C2_MacroAssembler& masm);
115 Label& push_and_slow_path() { return _push_and_slow_path; }
116 Label& check_successor() { return _check_successor; }
117 Label& unlocked_continuation() { return _unlocked_continuation; }
118 Label& slow_path_continuation() { return continuation(); }
119 };
120
121 #ifdef _LP64
122 class C2HandleAnonOMOwnerStub : public C2CodeStub {
123 private:
124 Register _monitor;
125 Register _tmp;
126 public:
127 C2HandleAnonOMOwnerStub(Register monitor, Register tmp = noreg) : C2CodeStub(),
128 _monitor(monitor), _tmp(tmp) {}
129 Register monitor() { return _monitor; }
130 Register tmp() { return _tmp; }
131 int max_size() const;
132 void emit(C2_MacroAssembler& masm);
|