< prev index next >

src/cpu/x86/vm/register_x86.hpp

Print this page
rev 11567 : 8160245: C1: Clean up platform #defines in c1_LIR.hpp.
Summary: Also add fnoreg on x86, LIR_Address constructor without scale, and clean up templateInterpreterGenerator.hpp.


 107   enum {
 108     number_of_registers = 8
 109   };
 110 
 111   // construction
 112   inline friend FloatRegister as_FloatRegister(int encoding);
 113 
 114   inline VMReg as_VMReg();
 115 
 116   // derived registers, offsets, and addresses
 117 
 118   FloatRegister successor() const                          { return as_FloatRegister(encoding() + 1); }
 119 
 120   // accessors
 121   int   encoding() const                          { assert(is_valid(), "invalid register"); return (intptr_t)this; }
 122   bool  is_valid() const                          { return 0 <= (intptr_t)this && (intptr_t)this < number_of_registers; }
 123   const char* name() const;
 124 
 125 };
 126 


 127 // Use XMMRegister as shortcut
 128 class XMMRegisterImpl;
 129 typedef XMMRegisterImpl* XMMRegister;
 130 
 131 // Use MMXRegister as shortcut
 132 class MMXRegisterImpl;
 133 typedef MMXRegisterImpl* MMXRegister;
 134 
 135 inline XMMRegister as_XMMRegister(int encoding) {
 136   return (XMMRegister)(intptr_t)encoding;
 137 }
 138 
 139 inline MMXRegister as_MMXRegister(int encoding) {
 140   return (MMXRegister)(intptr_t)encoding;
 141 }
 142 
 143 // The implementation of XMM registers for the IA32 architecture
 144 class XMMRegisterImpl: public AbstractRegisterImpl {
 145  public:
 146   enum {




 107   enum {
 108     number_of_registers = 8
 109   };
 110 
 111   // construction
 112   inline friend FloatRegister as_FloatRegister(int encoding);
 113 
 114   inline VMReg as_VMReg();
 115 
 116   // derived registers, offsets, and addresses
 117 
 118   FloatRegister successor() const                          { return as_FloatRegister(encoding() + 1); }
 119 
 120   // accessors
 121   int   encoding() const                          { assert(is_valid(), "invalid register"); return (intptr_t)this; }
 122   bool  is_valid() const                          { return 0 <= (intptr_t)this && (intptr_t)this < number_of_registers; }
 123   const char* name() const;
 124 
 125 };
 126 
 127 CONSTANT_REGISTER_DECLARATION(FloatRegister, fnoreg, (-1));
 128 
 129 // Use XMMRegister as shortcut
 130 class XMMRegisterImpl;
 131 typedef XMMRegisterImpl* XMMRegister;
 132 
 133 // Use MMXRegister as shortcut
 134 class MMXRegisterImpl;
 135 typedef MMXRegisterImpl* MMXRegister;
 136 
 137 inline XMMRegister as_XMMRegister(int encoding) {
 138   return (XMMRegister)(intptr_t)encoding;
 139 }
 140 
 141 inline MMXRegister as_MMXRegister(int encoding) {
 142   return (MMXRegister)(intptr_t)encoding;
 143 }
 144 
 145 // The implementation of XMM registers for the IA32 architecture
 146 class XMMRegisterImpl: public AbstractRegisterImpl {
 147  public:
 148   enum {


< prev index next >