src/share/vm/adlc/formsopt.hpp

Print this page
rev 2699 : 7090968: Allow adlc register class to depend on runtime conditions
Summary: allow reg_class definition as a function.
Reviewed-by:


 144   // Interface to define/redefine the register number
 145   void     set_register_num(uint32 new_register_num);
 146 
 147   // Bit pattern used for generating machine code
 148   const char *register_encode()   const;
 149   // Register number used in machine-independent code
 150   uint32   register_num()      const;
 151 
 152   void dump();                     // Debug printer
 153   void output(FILE *fp);           // Write info to output files
 154 };
 155 
 156 //------------------------------RegClass---------------------------------------
 157 class RegClass : public Form {
 158 public:
 159   // Public Data
 160   const char *_classid;         // Name of class
 161   NameList    _regDefs;         // List of registers in class
 162   Dict        _regDef;          // Dictionary of registers in class
 163   bool        _stack_or_reg;    // Allowed on any stack slot

 164 
 165   // Public Methods
 166   RegClass(const char *classid);// Constructor
 167 
 168   void addReg(RegDef *regDef);  // Add a register to this class
 169 
 170   uint size() const;            // Number of registers in class
 171   int regs_in_word( int wordnum, bool stack_also );
 172 
 173   const RegDef *get_RegDef(const char *regDef_name) const;
 174 
 175   // Returns the lowest numbered register in the mask.
 176   const RegDef* find_first_elem();
 177 
 178   // Iteration support
 179   void          reset();        // Reset the following two iterators
 180   RegDef       *RegDef_iter();  // which move jointly,
 181   const char   *rd_name_iter(); // invoking either advances both.
 182 
 183   void dump();                  // Debug printer




 144   // Interface to define/redefine the register number
 145   void     set_register_num(uint32 new_register_num);
 146 
 147   // Bit pattern used for generating machine code
 148   const char *register_encode()   const;
 149   // Register number used in machine-independent code
 150   uint32   register_num()      const;
 151 
 152   void dump();                     // Debug printer
 153   void output(FILE *fp);           // Write info to output files
 154 };
 155 
 156 //------------------------------RegClass---------------------------------------
 157 class RegClass : public Form {
 158 public:
 159   // Public Data
 160   const char *_classid;         // Name of class
 161   NameList    _regDefs;         // List of registers in class
 162   Dict        _regDef;          // Dictionary of registers in class
 163   bool        _stack_or_reg;    // Allowed on any stack slot
 164   char*       _user_defined;
 165 
 166   // Public Methods
 167   RegClass(const char *classid);// Constructor
 168 
 169   void addReg(RegDef *regDef);  // Add a register to this class
 170 
 171   uint size() const;            // Number of registers in class
 172   int regs_in_word( int wordnum, bool stack_also );
 173 
 174   const RegDef *get_RegDef(const char *regDef_name) const;
 175 
 176   // Returns the lowest numbered register in the mask.
 177   const RegDef* find_first_elem();
 178 
 179   // Iteration support
 180   void          reset();        // Reset the following two iterators
 181   RegDef       *RegDef_iter();  // which move jointly,
 182   const char   *rd_name_iter(); // invoking either advances both.
 183 
 184   void dump();                  // Debug printer