< prev index next >

src/share/vm/code/vmreg.hpp

Print this page




  27 
  28 #include "memory/allocation.hpp"
  29 #include "utilities/globalDefinitions.hpp"
  30 #include "asm/register.hpp"
  31 
  32 #ifdef COMPILER2
  33 #include "opto/adlcVMDeps.hpp"
  34 #include "utilities/ostream.hpp"
  35 #if defined ADGLOBALS_MD_HPP
  36 # include ADGLOBALS_MD_HPP
  37 #elif defined TARGET_ARCH_MODEL_x86_32
  38 # include "adfiles/adGlobals_x86_32.hpp"
  39 #elif defined TARGET_ARCH_MODEL_x86_64
  40 # include "adfiles/adGlobals_x86_64.hpp"
  41 #elif defined TARGET_ARCH_MODEL_sparc
  42 # include "adfiles/adGlobals_sparc.hpp"
  43 #elif defined TARGET_ARCH_MODEL_zero
  44 # include "adfiles/adGlobals_zero.hpp"
  45 #elif defined TARGET_ARCH_MODEL_ppc_64
  46 # include "adfiles/adGlobals_ppc_64.hpp"


  47 #endif
  48 #endif
  49 
  50 //------------------------------VMReg------------------------------------------
  51 // The VM uses 'unwarped' stack slots; the compiler uses 'warped' stack slots.
  52 // Register numbers below VMRegImpl::stack0 are the same for both.  Register
  53 // numbers above stack0 are either warped (in the compiler) or unwarped
  54 // (in the VM).  Unwarped numbers represent stack indices, offsets from
  55 // the current stack pointer.  Warped numbers are required during compilation
  56 // when we do not yet know how big the frame will be.
  57 
  58 class VMRegImpl;
  59 typedef VMRegImpl* VMReg;
  60 
  61 class VMRegImpl {
  62 // friend class OopMap;
  63 friend class VMStructs;
  64 friend class OptoReg;
  65 // friend class Location;
  66 private:


 150     assert( is_stack(), "Not a stack-based register" );
 151     return value() - stack0->value();
 152   }
 153 
 154   static void set_regName();
 155 
 156 #ifdef TARGET_ARCH_x86
 157 # include "vmreg_x86.hpp"
 158 #endif
 159 #ifdef TARGET_ARCH_sparc
 160 # include "vmreg_sparc.hpp"
 161 #endif
 162 #ifdef TARGET_ARCH_zero
 163 # include "vmreg_zero.hpp"
 164 #endif
 165 #ifdef TARGET_ARCH_arm
 166 # include "vmreg_arm.hpp"
 167 #endif
 168 #ifdef TARGET_ARCH_ppc
 169 # include "vmreg_ppc.hpp"



 170 #endif
 171 
 172 
 173 };
 174 
 175 //---------------------------VMRegPair-------------------------------------------
 176 // Pairs of 32-bit registers for arguments.
 177 // SharedRuntime::java_calling_convention will overwrite the structs with
 178 // the calling convention's registers.  VMRegImpl::Bad is returned for any
 179 // unused 32-bit register.  This happens for the unused high half of Int
 180 // arguments, or for 32-bit pointers or for longs in the 32-bit sparc build
 181 // (which are passed to natives in low 32-bits of e.g. O0/O1 and the high
 182 // 32-bits of O0/O1 are set to VMRegImpl::Bad).  Longs in one register & doubles
 183 // always return a high and a low register, as do 64-bit pointers.
 184 //
 185 class VMRegPair {
 186 private:
 187   VMReg _second;
 188   VMReg _first;
 189 public:




  27 
  28 #include "memory/allocation.hpp"
  29 #include "utilities/globalDefinitions.hpp"
  30 #include "asm/register.hpp"
  31 
  32 #ifdef COMPILER2
  33 #include "opto/adlcVMDeps.hpp"
  34 #include "utilities/ostream.hpp"
  35 #if defined ADGLOBALS_MD_HPP
  36 # include ADGLOBALS_MD_HPP
  37 #elif defined TARGET_ARCH_MODEL_x86_32
  38 # include "adfiles/adGlobals_x86_32.hpp"
  39 #elif defined TARGET_ARCH_MODEL_x86_64
  40 # include "adfiles/adGlobals_x86_64.hpp"
  41 #elif defined TARGET_ARCH_MODEL_sparc
  42 # include "adfiles/adGlobals_sparc.hpp"
  43 #elif defined TARGET_ARCH_MODEL_zero
  44 # include "adfiles/adGlobals_zero.hpp"
  45 #elif defined TARGET_ARCH_MODEL_ppc_64
  46 # include "adfiles/adGlobals_ppc_64.hpp"
  47 #elif defined TARGET_ARCH_MODEL_aarch32
  48 # include "adfiles/adGlobals_aarch32.hpp"
  49 #endif
  50 #endif
  51 
  52 //------------------------------VMReg------------------------------------------
  53 // The VM uses 'unwarped' stack slots; the compiler uses 'warped' stack slots.
  54 // Register numbers below VMRegImpl::stack0 are the same for both.  Register
  55 // numbers above stack0 are either warped (in the compiler) or unwarped
  56 // (in the VM).  Unwarped numbers represent stack indices, offsets from
  57 // the current stack pointer.  Warped numbers are required during compilation
  58 // when we do not yet know how big the frame will be.
  59 
  60 class VMRegImpl;
  61 typedef VMRegImpl* VMReg;
  62 
  63 class VMRegImpl {
  64 // friend class OopMap;
  65 friend class VMStructs;
  66 friend class OptoReg;
  67 // friend class Location;
  68 private:


 152     assert( is_stack(), "Not a stack-based register" );
 153     return value() - stack0->value();
 154   }
 155 
 156   static void set_regName();
 157 
 158 #ifdef TARGET_ARCH_x86
 159 # include "vmreg_x86.hpp"
 160 #endif
 161 #ifdef TARGET_ARCH_sparc
 162 # include "vmreg_sparc.hpp"
 163 #endif
 164 #ifdef TARGET_ARCH_zero
 165 # include "vmreg_zero.hpp"
 166 #endif
 167 #ifdef TARGET_ARCH_arm
 168 # include "vmreg_arm.hpp"
 169 #endif
 170 #ifdef TARGET_ARCH_ppc
 171 # include "vmreg_ppc.hpp"
 172 #endif
 173 #ifdef TARGET_ARCH_aarch32
 174 # include "vmreg_aarch32.hpp"
 175 #endif
 176 
 177 
 178 };
 179 
 180 //---------------------------VMRegPair-------------------------------------------
 181 // Pairs of 32-bit registers for arguments.
 182 // SharedRuntime::java_calling_convention will overwrite the structs with
 183 // the calling convention's registers.  VMRegImpl::Bad is returned for any
 184 // unused 32-bit register.  This happens for the unused high half of Int
 185 // arguments, or for 32-bit pointers or for longs in the 32-bit sparc build
 186 // (which are passed to natives in low 32-bits of e.g. O0/O1 and the high
 187 // 32-bits of O0/O1 are set to VMRegImpl::Bad).  Longs in one register & doubles
 188 // always return a high and a low register, as do 64-bit pointers.
 189 //
 190 class VMRegPair {
 191 private:
 192   VMReg _second;
 193   VMReg _first;
 194 public:


< prev index next >