src/share/vm/c1/c1_FrameMap.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File c1-coops Sdiff src/share/vm/c1

src/share/vm/c1/c1_FrameMap.hpp

Print this page




  59 //  |arguments | x | monitors | spill | reserved argument area | ABI |
  60 //  +----------+---+----------+-------+------------------------+-----+
  61 //
  62 //  x =  ABI area (SPARC) or  return adress and link (i486)
  63 //  ABI  = ABI area (SPARC) or nothing (i486)
  64 
  65 
  66 class LIR_OprDesc;
  67 typedef LIR_OprDesc* LIR_Opr;
  68 
  69 
  70 class FrameMap : public CompilationResourceObj {
  71  public:
  72   enum {
  73     nof_cpu_regs = pd_nof_cpu_regs_frame_map,
  74     nof_fpu_regs = pd_nof_fpu_regs_frame_map,
  75 
  76     nof_cpu_regs_reg_alloc = pd_nof_cpu_regs_reg_alloc,
  77     nof_fpu_regs_reg_alloc = pd_nof_fpu_regs_reg_alloc,
  78 
  79     nof_caller_save_cpu_regs = pd_nof_caller_save_cpu_regs_frame_map,
  80     nof_caller_save_fpu_regs = pd_nof_caller_save_fpu_regs_frame_map,
  81 
  82     spill_slot_size_in_bytes = 4
  83   };
  84 
  85 #ifdef TARGET_ARCH_x86
  86 # include "c1_FrameMap_x86.hpp"
  87 #endif
  88 #ifdef TARGET_ARCH_sparc
  89 # include "c1_FrameMap_sparc.hpp"
  90 #endif
  91 
  92 
  93   friend class LIR_OprDesc;
  94 
  95  private:
  96   static bool         _init_done;
  97   static Register     _cpu_rnr2reg [nof_cpu_regs];
  98   static int          _cpu_reg2rnr [nof_cpu_regs];
  99 
 100   static LIR_Opr      _caller_save_cpu_regs [nof_caller_save_cpu_regs];
 101   static LIR_Opr      _caller_save_fpu_regs [nof_caller_save_fpu_regs];
 102 
 103   int                 _framesize;
 104   int                 _argcount;
 105   int                 _num_monitors;
 106   int                 _num_spills;
 107   int                 _reserved_argument_area_size;
 108   int                 _oop_map_arg_count;
 109 
 110   CallingConvention*  _incoming_arguments;
 111   intArray*           _argument_locations;
 112 
 113   void check_spill_index   (int spill_index)   const { assert(spill_index   >= 0, "bad index"); }
 114   void check_monitor_index (int monitor_index) const { assert(monitor_index >= 0 &&
 115                                                               monitor_index < _num_monitors, "bad index"); }
 116 
 117   static Register cpu_rnr2reg (int rnr) {
 118     assert(_init_done, "tables not initialized");
 119     debug_only(cpu_range_check(rnr);)
 120     return _cpu_rnr2reg[rnr];


 226                               Location::Type loc_type, Location* loc) const;
 227 
 228   bool location_for_monitor_lock  (int monitor_index, Location* loc) const {
 229     return location_for_sp_offset(sp_offset_for_monitor_lock(monitor_index), Location::normal, loc);
 230   }
 231   bool location_for_monitor_object(int monitor_index, Location* loc) const {
 232     return location_for_sp_offset(sp_offset_for_monitor_object(monitor_index), Location::oop, loc);
 233   }
 234   bool locations_for_slot  (int index, Location::Type loc_type,
 235                             Location* loc, Location* second = NULL) const;
 236 
 237   VMReg slot_regname(int index) const {
 238     return sp_offset2vmreg(sp_offset_for_slot(index));
 239   }
 240   VMReg monitor_object_regname(int monitor_index) const {
 241     return sp_offset2vmreg(sp_offset_for_monitor_object(monitor_index));
 242   }
 243   VMReg regname(LIR_Opr opr) const;
 244 
 245   static LIR_Opr caller_save_cpu_reg_at(int i) {
 246     assert(i >= 0 && i < nof_caller_save_cpu_regs, "out of bounds");
 247     return _caller_save_cpu_regs[i];
 248   }
 249 
 250   static LIR_Opr caller_save_fpu_reg_at(int i) {
 251     assert(i >= 0 && i < nof_caller_save_fpu_regs, "out of bounds");
 252     return _caller_save_fpu_regs[i];
 253   }
 254 
 255   static void initialize();
 256 };
 257 
 258 //               CallingConvention
 259 //--------------------------------------------------------
 260 
 261 class CallingConvention: public ResourceObj {
 262  private:
 263   LIR_OprList* _args;
 264   int          _reserved_stack_slots;
 265 
 266  public:




  59 //  |arguments | x | monitors | spill | reserved argument area | ABI |
  60 //  +----------+---+----------+-------+------------------------+-----+
  61 //
  62 //  x =  ABI area (SPARC) or  return adress and link (i486)
  63 //  ABI  = ABI area (SPARC) or nothing (i486)
  64 
  65 
  66 class LIR_OprDesc;
  67 typedef LIR_OprDesc* LIR_Opr;
  68 
  69 
  70 class FrameMap : public CompilationResourceObj {
  71  public:
  72   enum {
  73     nof_cpu_regs = pd_nof_cpu_regs_frame_map,
  74     nof_fpu_regs = pd_nof_fpu_regs_frame_map,
  75 
  76     nof_cpu_regs_reg_alloc = pd_nof_cpu_regs_reg_alloc,
  77     nof_fpu_regs_reg_alloc = pd_nof_fpu_regs_reg_alloc,
  78 
  79     max_nof_caller_save_cpu_regs = pd_nof_caller_save_cpu_regs_frame_map,
  80     nof_caller_save_fpu_regs     = pd_nof_caller_save_fpu_regs_frame_map,
  81 
  82     spill_slot_size_in_bytes = 4
  83   };
  84 
  85 #ifdef TARGET_ARCH_x86
  86 # include "c1_FrameMap_x86.hpp"
  87 #endif
  88 #ifdef TARGET_ARCH_sparc
  89 # include "c1_FrameMap_sparc.hpp"
  90 #endif
  91 
  92 
  93   friend class LIR_OprDesc;
  94 
  95  private:
  96   static bool         _init_done;
  97   static Register     _cpu_rnr2reg [nof_cpu_regs];
  98   static int          _cpu_reg2rnr [nof_cpu_regs];
  99 
 100   static LIR_Opr      _caller_save_cpu_regs [max_nof_caller_save_cpu_regs];
 101   static LIR_Opr      _caller_save_fpu_regs [nof_caller_save_fpu_regs];
 102 
 103   int                 _framesize;
 104   int                 _argcount;
 105   int                 _num_monitors;
 106   int                 _num_spills;
 107   int                 _reserved_argument_area_size;
 108   int                 _oop_map_arg_count;
 109 
 110   CallingConvention*  _incoming_arguments;
 111   intArray*           _argument_locations;
 112 
 113   void check_spill_index   (int spill_index)   const { assert(spill_index   >= 0, "bad index"); }
 114   void check_monitor_index (int monitor_index) const { assert(monitor_index >= 0 &&
 115                                                               monitor_index < _num_monitors, "bad index"); }
 116 
 117   static Register cpu_rnr2reg (int rnr) {
 118     assert(_init_done, "tables not initialized");
 119     debug_only(cpu_range_check(rnr);)
 120     return _cpu_rnr2reg[rnr];


 226                               Location::Type loc_type, Location* loc) const;
 227 
 228   bool location_for_monitor_lock  (int monitor_index, Location* loc) const {
 229     return location_for_sp_offset(sp_offset_for_monitor_lock(monitor_index), Location::normal, loc);
 230   }
 231   bool location_for_monitor_object(int monitor_index, Location* loc) const {
 232     return location_for_sp_offset(sp_offset_for_monitor_object(monitor_index), Location::oop, loc);
 233   }
 234   bool locations_for_slot  (int index, Location::Type loc_type,
 235                             Location* loc, Location* second = NULL) const;
 236 
 237   VMReg slot_regname(int index) const {
 238     return sp_offset2vmreg(sp_offset_for_slot(index));
 239   }
 240   VMReg monitor_object_regname(int monitor_index) const {
 241     return sp_offset2vmreg(sp_offset_for_monitor_object(monitor_index));
 242   }
 243   VMReg regname(LIR_Opr opr) const;
 244 
 245   static LIR_Opr caller_save_cpu_reg_at(int i) {
 246     assert(i >= 0 && i < max_nof_caller_save_cpu_regs, "out of bounds");
 247     return _caller_save_cpu_regs[i];
 248   }
 249 
 250   static LIR_Opr caller_save_fpu_reg_at(int i) {
 251     assert(i >= 0 && i < nof_caller_save_fpu_regs, "out of bounds");
 252     return _caller_save_fpu_regs[i];
 253   }
 254 
 255   static void initialize();
 256 };
 257 
 258 //               CallingConvention
 259 //--------------------------------------------------------
 260 
 261 class CallingConvention: public ResourceObj {
 262  private:
 263   LIR_OprList* _args;
 264   int          _reserved_stack_slots;
 265 
 266  public:


src/share/vm/c1/c1_FrameMap.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File