< prev index next >

src/hotspot/share/adlc/formsopt.hpp

Print this page
rev 53791 : [mq]: JDK-8217909.patch


 225 // where DFLT_REG_mask() and DFLT_LOW_REG_mask() are the internal names of the
 226 // masks of register classes dflt_reg and dflt_low_reg.
 227 //
 228 // The attached code snippet can select also between more than two register classes.
 229 // This register class can be, however, used only if the register class is not
 230 // cisc-spillable (i.e., the registers of this class are not allowed on the stack,
 231 // which is equivalent with _stack_or_reg being false).
 232 class CodeSnippetRegClass : public RegClass {
 233 protected:
 234   char* _code_snippet;
 235 public:
 236   CodeSnippetRegClass(const char* classid);// Constructor
 237   ~CodeSnippetRegClass();
 238 
 239   void set_code_snippet(char* code) {
 240     _code_snippet = code;
 241   }
 242   char* code_snippet() {
 243     return _code_snippet;
 244   }
 245   void set_stack_version(bool flag) {
 246     assert(false, "User defined register classes are not allowed to spill to the stack.");
 247   }
 248   void declare_register_masks(FILE* fp);
 249   void build_register_masks(FILE* fp) {
 250     // We do not need to generate register masks because we select at runtime
 251     // between register masks generated for other register classes.
 252     return;
 253   }
 254 };
 255 
 256 //------------------------------ConditionalRegClass----------------------------
 257 // Register class that has two register classes and a runtime condition attached
 258 // to it. The condition is evaluated at runtime and either one of the register
 259 // attached register classes is selected. This register class is the internal
 260 // representation for the following .ad format:
 261 //
 262 //  reg_class_dynamic actual_dflt_reg(dflt_reg, low_reg,
 263 //                                    %{ VM_Version::has_vfp3_32() }%
 264 //                                    );
 265 //
 266 // This example is equivalent to the example used with the CodeSnippetRegClass
 267 // register class. A ConditionalRegClass works also if a register class is cisc-spillable




 225 // where DFLT_REG_mask() and DFLT_LOW_REG_mask() are the internal names of the
 226 // masks of register classes dflt_reg and dflt_low_reg.
 227 //
 228 // The attached code snippet can select also between more than two register classes.
 229 // This register class can be, however, used only if the register class is not
 230 // cisc-spillable (i.e., the registers of this class are not allowed on the stack,
 231 // which is equivalent with _stack_or_reg being false).
 232 class CodeSnippetRegClass : public RegClass {
 233 protected:
 234   char* _code_snippet;
 235 public:
 236   CodeSnippetRegClass(const char* classid);// Constructor
 237   ~CodeSnippetRegClass();
 238 
 239   void set_code_snippet(char* code) {
 240     _code_snippet = code;
 241   }
 242   char* code_snippet() {
 243     return _code_snippet;
 244   }



 245   void declare_register_masks(FILE* fp);
 246   void build_register_masks(FILE* fp) {
 247     // We do not need to generate register masks because we select at runtime
 248     // between register masks generated for other register classes.
 249     return;
 250   }
 251 };
 252 
 253 //------------------------------ConditionalRegClass----------------------------
 254 // Register class that has two register classes and a runtime condition attached
 255 // to it. The condition is evaluated at runtime and either one of the register
 256 // attached register classes is selected. This register class is the internal
 257 // representation for the following .ad format:
 258 //
 259 //  reg_class_dynamic actual_dflt_reg(dflt_reg, low_reg,
 260 //                                    %{ VM_Version::has_vfp3_32() }%
 261 //                                    );
 262 //
 263 // This example is equivalent to the example used with the CodeSnippetRegClass
 264 // register class. A ConditionalRegClass works also if a register class is cisc-spillable


< prev index next >