< prev index next >

src/share/vm/c1/c1_FrameMap.hpp

Print this page
rev 11647 : 8161258: Simplify including platform files.
Summary: Include patform files with macros cpu_header() etc. Do various cleanups of macro usages. Remove _64/_32 from adlc generated files and platform .hpp files. Merge stubRoutines_x86*.hpp. Remove empty mutex_<os>* files.
Reviewed-by: dholmes, coleenp, kbarrett


  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_C1_C1_FRAMEMAP_HPP
  26 #define SHARE_VM_C1_C1_FRAMEMAP_HPP
  27 
  28 #include "asm/assembler.hpp"
  29 #include "c1/c1_Defs.hpp"
  30 #include "c1/c1_LIR.hpp"
  31 #include "code/vmreg.hpp"
  32 #include "memory/allocation.hpp"
  33 #include "runtime/frame.hpp"
  34 #include "runtime/synchronizer.hpp"
  35 #include "utilities/globalDefinitions.hpp"

  36 
  37 class ciMethod;
  38 class CallingConvention;
  39 
  40 //--------------------------------------------------------
  41 //               FrameMap
  42 //--------------------------------------------------------
  43 
  44 //  This class is responsible of mapping items (locals, monitors, spill
  45 //  slots and registers to their frame location
  46 //
  47 //  The monitors are specified by a consecutive index, although each monitor entry
  48 //  occupies two words. The monitor_index is 0.._num_monitors
  49 //  The spill index is similar to local index; it is in range 0..(open)
  50 //
  51 //  The CPU registers are mapped using a fixed table; register with number 0
  52 //  is the most used one.
  53 
  54 
  55 //   stack grow direction -->                                        SP


  63 
  64 class LIR_OprDesc;
  65 typedef LIR_OprDesc* LIR_Opr;
  66 
  67 
  68 class FrameMap : public CompilationResourceObj {
  69  public:
  70   enum {
  71     nof_cpu_regs = pd_nof_cpu_regs_frame_map,
  72     nof_fpu_regs = pd_nof_fpu_regs_frame_map,
  73 
  74     nof_cpu_regs_reg_alloc = pd_nof_cpu_regs_reg_alloc,
  75     nof_fpu_regs_reg_alloc = pd_nof_fpu_regs_reg_alloc,
  76 
  77     max_nof_caller_save_cpu_regs = pd_nof_caller_save_cpu_regs_frame_map,
  78     nof_caller_save_fpu_regs     = pd_nof_caller_save_fpu_regs_frame_map,
  79 
  80     spill_slot_size_in_bytes = 4
  81   };
  82 
  83 #ifdef TARGET_ARCH_x86
  84 # include "c1_FrameMap_x86.hpp"
  85 #endif
  86 #ifdef TARGET_ARCH_sparc
  87 # include "c1_FrameMap_sparc.hpp"
  88 #endif
  89 #ifdef TARGET_ARCH_arm
  90 # include "c1_FrameMap_arm.hpp"
  91 #endif
  92 #ifdef TARGET_ARCH_ppc
  93 # include "c1_FrameMap_ppc.hpp"
  94 #endif
  95 #ifdef TARGET_ARCH_aarch64
  96 # include "c1_FrameMap_aarch64.hpp"
  97 #endif
  98 
  99 
 100   friend class LIR_OprDesc;
 101 
 102  private:
 103   static bool         _init_done;
 104   static Register     _cpu_rnr2reg [nof_cpu_regs];
 105   static int          _cpu_reg2rnr [nof_cpu_regs];
 106 
 107   static LIR_Opr      _caller_save_cpu_regs [max_nof_caller_save_cpu_regs];
 108   static LIR_Opr      _caller_save_fpu_regs [nof_caller_save_fpu_regs];
 109 
 110   int                 _framesize;
 111   int                 _argcount;
 112   int                 _num_monitors;
 113   int                 _num_spills;
 114   int                 _reserved_argument_area_size;
 115   int                 _oop_map_arg_count;
 116 
 117   CallingConvention*  _incoming_arguments;
 118   intArray*           _argument_locations;




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_C1_C1_FRAMEMAP_HPP
  26 #define SHARE_VM_C1_C1_FRAMEMAP_HPP
  27 
  28 #include "asm/assembler.hpp"
  29 #include "c1/c1_Defs.hpp"
  30 #include "c1/c1_LIR.hpp"
  31 #include "code/vmreg.hpp"
  32 #include "memory/allocation.hpp"
  33 #include "runtime/frame.hpp"
  34 #include "runtime/synchronizer.hpp"
  35 #include "utilities/globalDefinitions.hpp"
  36 #include "utilities/macros.hpp"
  37 
  38 class ciMethod;
  39 class CallingConvention;
  40 
  41 //--------------------------------------------------------
  42 //               FrameMap
  43 //--------------------------------------------------------
  44 
  45 //  This class is responsible of mapping items (locals, monitors, spill
  46 //  slots and registers to their frame location
  47 //
  48 //  The monitors are specified by a consecutive index, although each monitor entry
  49 //  occupies two words. The monitor_index is 0.._num_monitors
  50 //  The spill index is similar to local index; it is in range 0..(open)
  51 //
  52 //  The CPU registers are mapped using a fixed table; register with number 0
  53 //  is the most used one.
  54 
  55 
  56 //   stack grow direction -->                                        SP


  64 
  65 class LIR_OprDesc;
  66 typedef LIR_OprDesc* LIR_Opr;
  67 
  68 
  69 class FrameMap : public CompilationResourceObj {
  70  public:
  71   enum {
  72     nof_cpu_regs = pd_nof_cpu_regs_frame_map,
  73     nof_fpu_regs = pd_nof_fpu_regs_frame_map,
  74 
  75     nof_cpu_regs_reg_alloc = pd_nof_cpu_regs_reg_alloc,
  76     nof_fpu_regs_reg_alloc = pd_nof_fpu_regs_reg_alloc,
  77 
  78     max_nof_caller_save_cpu_regs = pd_nof_caller_save_cpu_regs_frame_map,
  79     nof_caller_save_fpu_regs     = pd_nof_caller_save_fpu_regs_frame_map,
  80 
  81     spill_slot_size_in_bytes = 4
  82   };
  83 
  84 #include CPU_HEADER(c1_FrameMap)















  85 
  86   friend class LIR_OprDesc;
  87 
  88  private:
  89   static bool         _init_done;
  90   static Register     _cpu_rnr2reg [nof_cpu_regs];
  91   static int          _cpu_reg2rnr [nof_cpu_regs];
  92 
  93   static LIR_Opr      _caller_save_cpu_regs [max_nof_caller_save_cpu_regs];
  94   static LIR_Opr      _caller_save_fpu_regs [nof_caller_save_fpu_regs];
  95 
  96   int                 _framesize;
  97   int                 _argcount;
  98   int                 _num_monitors;
  99   int                 _num_spills;
 100   int                 _reserved_argument_area_size;
 101   int                 _oop_map_arg_count;
 102 
 103   CallingConvention*  _incoming_arguments;
 104   intArray*           _argument_locations;


< prev index next >