< prev index next >

src/hotspot/share/c1/c1_FrameMap.hpp

Print this page

167 
168   // deopt support
169   ByteSize sp_offset_for_orig_pc() { return sp_offset_for_monitor_base(_num_monitors); }
170 
171   static LIR_Opr as_opr(Register r) {
172     return LIR_OprFact::single_cpu(cpu_reg2rnr(r));
173   }
174   static LIR_Opr as_oop_opr(Register r) {
175     return LIR_OprFact::single_cpu_oop(cpu_reg2rnr(r));
176   }
177 
178   static LIR_Opr as_metadata_opr(Register r) {
179     return LIR_OprFact::single_cpu_metadata(cpu_reg2rnr(r));
180   }
181 
182   static LIR_Opr as_address_opr(Register r) {
183     return LIR_OprFact::single_cpu_address(cpu_reg2rnr(r));
184   }
185 
186   FrameMap(ciMethod* method, int monitors, int reserved_argument_area_size);
187   bool finalize_frame(int nof_slots);
188 
189   int   reserved_argument_area_size () const     { return _reserved_argument_area_size; }
190   int   framesize                   () const     { assert(_framesize != -1, "hasn't been calculated"); return _framesize; }
191   ByteSize framesize_in_bytes       () const     { return in_ByteSize(framesize() * 4); }
192   int   num_monitors                () const     { return _num_monitors; }
193   int   num_spills                  () const     { assert(_num_spills >= 0, "not set"); return _num_spills; }
194   int   argcount              () const     { assert(_argcount >= 0, "not set"); return _argcount; }
195 
196   int oop_map_arg_count() const { return _oop_map_arg_count; }
197 
198   CallingConvention* incoming_arguments() const  { return _incoming_arguments; }
199 
200   // convenience routines
201   Address address_for_slot(int index, int sp_adjust = 0) const {
202     return make_new_address(sp_offset_for_slot(index) + in_ByteSize(sp_adjust));
203   }
204   Address address_for_double_slot(int index, int sp_adjust = 0) const {
205     return make_new_address(sp_offset_for_double_slot(index) + in_ByteSize(sp_adjust));
206   }
207   Address address_for_monitor_lock(int monitor_index) const {
208     return make_new_address(sp_offset_for_monitor_lock(monitor_index));
209   }
210   Address address_for_monitor_object(int monitor_index) const {
211     return make_new_address(sp_offset_for_monitor_object(monitor_index));
212   }



213 
214   // Creates Location describing desired slot and returns it via pointer
215   // to Location object. Returns true if the stack frame offset was legal
216   // (as defined by Location::legal_offset_in_bytes()), false otherwise.
217   // Do not use the returned location if this returns false.
218   bool location_for_sp_offset(ByteSize byte_offset_from_sp,
219                               Location::Type loc_type, Location* loc) const;
220 
221   bool location_for_monitor_lock  (int monitor_index, Location* loc) const {
222     return location_for_sp_offset(sp_offset_for_monitor_lock(monitor_index), Location::normal, loc);
223   }
224   bool location_for_monitor_object(int monitor_index, Location* loc) const {
225     return location_for_sp_offset(sp_offset_for_monitor_object(monitor_index), Location::oop, loc);
226   }
227   bool locations_for_slot  (int index, Location::Type loc_type,
228                             Location* loc, Location* second = nullptr) const;
229 
230   VMReg slot_regname(int index) const {
231     return sp_offset2vmreg(sp_offset_for_slot(index));
232   }

167 
168   // deopt support
169   ByteSize sp_offset_for_orig_pc() { return sp_offset_for_monitor_base(_num_monitors); }
170 
171   static LIR_Opr as_opr(Register r) {
172     return LIR_OprFact::single_cpu(cpu_reg2rnr(r));
173   }
174   static LIR_Opr as_oop_opr(Register r) {
175     return LIR_OprFact::single_cpu_oop(cpu_reg2rnr(r));
176   }
177 
178   static LIR_Opr as_metadata_opr(Register r) {
179     return LIR_OprFact::single_cpu_metadata(cpu_reg2rnr(r));
180   }
181 
182   static LIR_Opr as_address_opr(Register r) {
183     return LIR_OprFact::single_cpu_address(cpu_reg2rnr(r));
184   }
185 
186   FrameMap(ciMethod* method, int monitors, int reserved_argument_area_size);
187   bool finalize_frame(int nof_slots, bool needs_stack_repair);
188 
189   int   reserved_argument_area_size () const     { return _reserved_argument_area_size; }
190   int   framesize                   () const     { assert(_framesize != -1, "hasn't been calculated"); return _framesize; }
191   ByteSize framesize_in_bytes       () const     { return in_ByteSize(framesize() * 4); }
192   int   num_monitors                () const     { return _num_monitors; }
193   int   num_spills                  () const     { assert(_num_spills >= 0, "not set"); return _num_spills; }
194   int   argcount              () const     { assert(_argcount >= 0, "not set"); return _argcount; }
195 
196   int oop_map_arg_count() const { return _oop_map_arg_count; }
197 
198   CallingConvention* incoming_arguments() const  { return _incoming_arguments; }
199 
200   // convenience routines
201   Address address_for_slot(int index, int sp_adjust = 0) const {
202     return make_new_address(sp_offset_for_slot(index) + in_ByteSize(sp_adjust));
203   }
204   Address address_for_double_slot(int index, int sp_adjust = 0) const {
205     return make_new_address(sp_offset_for_double_slot(index) + in_ByteSize(sp_adjust));
206   }
207   Address address_for_monitor_lock(int monitor_index) const {
208     return make_new_address(sp_offset_for_monitor_lock(monitor_index));
209   }
210   Address address_for_monitor_object(int monitor_index) const {
211     return make_new_address(sp_offset_for_monitor_object(monitor_index));
212   }
213   Address address_for_orig_pc_addr() const {
214     return make_new_address(sp_offset_for_monitor_base(_num_monitors));
215   }
216 
217   // Creates Location describing desired slot and returns it via pointer
218   // to Location object. Returns true if the stack frame offset was legal
219   // (as defined by Location::legal_offset_in_bytes()), false otherwise.
220   // Do not use the returned location if this returns false.
221   bool location_for_sp_offset(ByteSize byte_offset_from_sp,
222                               Location::Type loc_type, Location* loc) const;
223 
224   bool location_for_monitor_lock  (int monitor_index, Location* loc) const {
225     return location_for_sp_offset(sp_offset_for_monitor_lock(monitor_index), Location::normal, loc);
226   }
227   bool location_for_monitor_object(int monitor_index, Location* loc) const {
228     return location_for_sp_offset(sp_offset_for_monitor_object(monitor_index), Location::oop, loc);
229   }
230   bool locations_for_slot  (int index, Location::Type loc_type,
231                             Location* loc, Location* second = nullptr) const;
232 
233   VMReg slot_regname(int index) const {
234     return sp_offset2vmreg(sp_offset_for_slot(index));
235   }
< prev index next >