< prev index next >

src/hotspot/share/c1/c1_FrameMap.hpp

Print this page

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



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

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