< prev index next >

src/hotspot/share/opto/c2_CodeStubs.hpp

Print this page

 93 
 94   Label& guard() { return _guard; }
 95 
 96   int max_size() const;
 97   void emit(C2_MacroAssembler& masm);
 98 };
 99 
100 #ifdef _LP64
101 class C2HandleAnonOMOwnerStub : public C2CodeStub {
102 private:
103   Register _monitor;
104   Register _tmp;
105 public:
106   C2HandleAnonOMOwnerStub(Register monitor, Register tmp = noreg) : C2CodeStub(),
107     _monitor(monitor), _tmp(tmp) {}
108   Register monitor() { return _monitor; }
109   Register tmp() { return _tmp; }
110   int max_size() const;
111   void emit(C2_MacroAssembler& masm);
112 };










113 #endif
114 
115 //-----------------------------C2GeneralStub-----------------------------------
116 // A generalized stub that can be used to implement an arbitrary stub in a
117 // type-safe manner. An example:
118 //
119 // Register dst; XMMRegister src;
120 // // The lambda defining how the code is emitted in the stub
121 // auto slowpath = [](C2_MacroAssembler& masm, C2GeneralStub<Register, XMMRegister>& stub) {
122 //   // Access the saved data in a type safe manner
123 //   Register dst = stub.get<0>();
124 //   XMMRegister src = stub.get<1>();
125 //   masm.bind(stub.entry());
126 //   ...
127 //   masm.jump(stub.continuation());
128 // }
129 // // Create a stub with 2 data fields being dst and src, a max size of 4 bytes
130 // // and predefined emission function
131 // auto stub = C2CodeStub::make<Register, XMMRegister>(dst, src, 4, slowpath);
132 // __ jump_conditional(stub->entry());

 93 
 94   Label& guard() { return _guard; }
 95 
 96   int max_size() const;
 97   void emit(C2_MacroAssembler& masm);
 98 };
 99 
100 #ifdef _LP64
101 class C2HandleAnonOMOwnerStub : public C2CodeStub {
102 private:
103   Register _monitor;
104   Register _tmp;
105 public:
106   C2HandleAnonOMOwnerStub(Register monitor, Register tmp = noreg) : C2CodeStub(),
107     _monitor(monitor), _tmp(tmp) {}
108   Register monitor() { return _monitor; }
109   Register tmp() { return _tmp; }
110   int max_size() const;
111   void emit(C2_MacroAssembler& masm);
112 };
113 
114 class C2LoadNKlassStub : public C2CodeStub {
115 private:
116   Register _dst;
117 public:
118   C2LoadNKlassStub(Register dst) : C2CodeStub(), _dst(dst) {}
119   Register dst() { return _dst; }
120   int max_size() const;
121   void emit(C2_MacroAssembler& masm);
122 };
123 #endif
124 
125 //-----------------------------C2GeneralStub-----------------------------------
126 // A generalized stub that can be used to implement an arbitrary stub in a
127 // type-safe manner. An example:
128 //
129 // Register dst; XMMRegister src;
130 // // The lambda defining how the code is emitted in the stub
131 // auto slowpath = [](C2_MacroAssembler& masm, C2GeneralStub<Register, XMMRegister>& stub) {
132 //   // Access the saved data in a type safe manner
133 //   Register dst = stub.get<0>();
134 //   XMMRegister src = stub.get<1>();
135 //   masm.bind(stub.entry());
136 //   ...
137 //   masm.jump(stub.continuation());
138 // }
139 // // Create a stub with 2 data fields being dst and src, a max size of 4 bytes
140 // // and predefined emission function
141 // auto stub = C2CodeStub::make<Register, XMMRegister>(dst, src, 4, slowpath);
142 // __ jump_conditional(stub->entry());
< prev index next >