< prev index next >

src/hotspot/share/c1/c1_FrameMap.hpp

Print this page

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



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

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