< prev index next >

src/hotspot/cpu/x86/x86_64.ad

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

*** 167,178 **** // // Empty register class. reg_class no_reg(); // Class for all pointer registers (including RSP and RBP) ! reg_class any_reg_with_rbp(RAX, RAX_H, RDX, RDX_H, RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, --- 167,267 ---- // // Empty register class. reg_class no_reg(); + // Class for all pointer/long registers + reg_class all_reg(RAX, RAX_H, + RDX, RDX_H, + RBP, RBP_H, + RDI, RDI_H, + RSI, RSI_H, + RCX, RCX_H, + RBX, RBX_H, + RSP, RSP_H, + R8, R8_H, + R9, R9_H, + R10, R10_H, + R11, R11_H, + R12, R12_H, + R13, R13_H, + R14, R14_H, + R15, R15_H); + + // Class for all int registers + reg_class all_int_reg(RAX + RDX, + RBP, + RDI, + RSI, + RCX, + RBX, + R8, + R9, + R10, + R11, + R12, + R13, + R14); + + // Class for all pointer registers + reg_class any_reg %{ + return _ANY_REG_mask; + %} + + // Class for all pointer registers (excluding RSP) + reg_class ptr_reg %{ + return _PTR_REG_mask; + %} + + // Class for all pointer registers (excluding RSP and RBP) + reg_class ptr_reg_no_rbp %{ + return _PTR_REG_NO_RBP_mask; + %} + + // Class for all pointer registers (excluding RAX and RSP) + reg_class ptr_no_rax_reg %{ + return _PTR_NO_RAX_REG_mask; + %} + + // Class for all pointer registers (excluding RAX, RBX, and RSP) + reg_class ptr_no_rax_rbx_reg %{ + return _PTR_NO_RAX_RBX_REG_mask; + %} + + // Class for all long registers (excluding RSP) + reg_class long_reg %{ + return _LONG_REG_mask; + %} + + // Class for all long registers (excluding RAX, RDX and RSP) + reg_class long_no_rax_rdx_reg %{ + return _LONG_NO_RAX_RDX_REG_mask; + %} + + // Class for all long registers (excluding RCX and RSP) + reg_class long_no_rcx_reg %{ + return _LONG_NO_RCX_REG_mask; + %} + + // Class for all int registers (excluding RSP) + reg_class int_reg %{ + return _INT_REG_mask; + %} + + // Class for all int registers (excluding RAX, RDX, and RSP) + reg_class int_no_rax_rdx_reg %{ + return _INT_NO_RAX_RDX_REG_mask; + %} + + // Class for all int registers (excluding RCX and RSP) + reg_class int_no_rcx_reg %{ + return _INT_NO_RCX_REG_mask; + %} + // Class for all pointer registers (including RSP and RBP) ! reg_class any_reg0_with_rbp(RAX, RAX_H, RDX, RDX_H, RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H,
*** 186,196 **** R13, R13_H, R14, R14_H, R15, R15_H); // Class for all pointer registers (including RSP, but excluding RBP) ! reg_class any_reg_no_rbp(RAX, RAX_H, RDX, RDX_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H, --- 275,285 ---- R13, R13_H, R14, R14_H, R15, R15_H); // Class for all pointer registers (including RSP, but excluding RBP) ! reg_class any_reg0_no_rbp(RAX, RAX_H, RDX, RDX_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H,
*** 205,218 **** R15, R15_H); // Dynamic register class that selects at runtime between register classes // any_reg_no_rbp and any_reg_with_rbp (depending on the value of the flag PreserveFramePointer). // Equivalent to: return PreserveFramePointer ? any_reg_no_rbp : any_reg_with_rbp; ! reg_class_dynamic any_reg(any_reg_no_rbp, any_reg_with_rbp, %{ PreserveFramePointer %}); ! // Class for all pointer registers (excluding RSP) ! reg_class ptr_reg_with_rbp(RAX, RAX_H, RDX, RDX_H, RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, --- 294,307 ---- R15, R15_H); // Dynamic register class that selects at runtime between register classes // any_reg_no_rbp and any_reg_with_rbp (depending on the value of the flag PreserveFramePointer). // Equivalent to: return PreserveFramePointer ? any_reg_no_rbp : any_reg_with_rbp; ! reg_class_dynamic any_reg0(any_reg0_no_rbp, any_reg0_with_rbp, %{ PreserveFramePointer %}); ! // Class for all pointer registers ! reg_class ptr_reg0_with_rbp(RAX, RAX_H, RDX, RDX_H, RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H,
*** 222,233 **** R10, R10_H, R11, R11_H, R13, R13_H, R14, R14_H); ! // Class for all pointer registers (excluding RSP and RBP) ! reg_class ptr_reg_no_rbp(RAX, RAX_H, RDX, RDX_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H, --- 311,321 ---- R10, R10_H, R11, R11_H, R13, R13_H, R14, R14_H); ! reg_class ptr_reg0_no_rbp(RAX, RAX_H, RDX, RDX_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H,
*** 237,250 **** R11, R11_H, R13, R13_H, R14, R14_H); // Dynamic register class that selects between ptr_reg_no_rbp and ptr_reg_with_rbp. ! reg_class_dynamic ptr_reg(ptr_reg_no_rbp, ptr_reg_with_rbp, %{ PreserveFramePointer %}); // Class for all pointer registers (excluding RAX and RSP) ! reg_class ptr_no_rax_reg_with_rbp(RDX, RDX_H, RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H, --- 325,338 ---- R11, R11_H, R13, R13_H, R14, R14_H); // Dynamic register class that selects between ptr_reg_no_rbp and ptr_reg_with_rbp. ! reg_class_dynamic ptr_reg0(ptr_reg0_no_rbp, ptr_reg0_with_rbp, %{ PreserveFramePointer %}); // Class for all pointer registers (excluding RAX and RSP) ! reg_class ptr_no_rax_reg0_with_rbp(RDX, RDX_H, RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H,
*** 254,264 **** R11, R11_H, R13, R13_H, R14, R14_H); // Class for all pointer registers (excluding RAX, RSP, and RBP) ! reg_class ptr_no_rax_reg_no_rbp(RDX, RDX_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H, R8, R8_H, --- 342,352 ---- R11, R11_H, R13, R13_H, R14, R14_H); // Class for all pointer registers (excluding RAX, RSP, and RBP) ! reg_class ptr_no_rax_reg0_no_rbp(RDX, RDX_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H, R8, R8_H,
*** 267,280 **** R11, R11_H, R13, R13_H, R14, R14_H); // Dynamic register class that selects between ptr_no_rax_reg_no_rbp and ptr_no_rax_reg_with_rbp. ! reg_class_dynamic ptr_no_rax_reg(ptr_no_rax_reg_no_rbp, ptr_no_rax_reg_with_rbp, %{ PreserveFramePointer %}); // Class for all pointer registers (excluding RAX, RBX, and RSP) ! reg_class ptr_no_rax_rbx_reg_with_rbp(RDX, RDX_H, RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, R8, R8_H, --- 355,368 ---- R11, R11_H, R13, R13_H, R14, R14_H); // Dynamic register class that selects between ptr_no_rax_reg_no_rbp and ptr_no_rax_reg_with_rbp. ! reg_class_dynamic ptr_no_rax_reg0(ptr_no_rax_reg0_no_rbp, ptr_no_rax_reg0_with_rbp, %{ PreserveFramePointer %}); // Class for all pointer registers (excluding RAX, RBX, and RSP) ! reg_class ptr_no_rax_rbx_reg0_with_rbp(RDX, RDX_H, RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, R8, R8_H,
*** 283,293 **** R11, R11_H, R13, R13_H, R14, R14_H); // Class for all pointer registers (excluding RAX, RBX, RSP, and RBP) ! reg_class ptr_no_rax_rbx_reg_no_rbp(RDX, RDX_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, R8, R8_H, R9, R9_H, --- 371,381 ---- R11, R11_H, R13, R13_H, R14, R14_H); // Class for all pointer registers (excluding RAX, RBX, RSP, and RBP) ! reg_class ptr_no_rax_rbx_reg0_no_rbp(RDX, RDX_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, R8, R8_H, R9, R9_H,
*** 295,305 **** R11, R11_H, R13, R13_H, R14, R14_H); // Dynamic register class that selects between ptr_no_rax_rbx_reg_no_rbp and ptr_no_rax_rbx_reg_with_rbp. ! reg_class_dynamic ptr_no_rax_rbx_reg(ptr_no_rax_rbx_reg_no_rbp, ptr_no_rax_rbx_reg_with_rbp, %{ PreserveFramePointer %}); // Singleton class for RAX pointer register reg_class ptr_rax_reg(RAX, RAX_H); // Singleton class for RBX pointer register --- 383,393 ---- R11, R11_H, R13, R13_H, R14, R14_H); // Dynamic register class that selects between ptr_no_rax_rbx_reg_no_rbp and ptr_no_rax_rbx_reg_with_rbp. ! reg_class_dynamic ptr_no_rax_rbx_reg0(ptr_no_rax_rbx_reg0_no_rbp, ptr_no_rax_rbx_reg0_with_rbp, %{ PreserveFramePointer %}); // Singleton class for RAX pointer register reg_class ptr_rax_reg(RAX, RAX_H); // Singleton class for RBX pointer register
*** 316,326 **** // Singleton class for TLS pointer reg_class ptr_r15_reg(R15, R15_H); // Class for all long registers (excluding RSP) ! reg_class long_reg_with_rbp(RAX, RAX_H, RDX, RDX_H, RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, --- 404,414 ---- // Singleton class for TLS pointer reg_class ptr_r15_reg(R15, R15_H); // Class for all long registers (excluding RSP) ! reg_class long_reg0_with_rbp(RAX, RAX_H, RDX, RDX_H, RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H,
*** 331,341 **** R11, R11_H, R13, R13_H, R14, R14_H); // Class for all long registers (excluding RSP and RBP) ! reg_class long_reg_no_rbp(RAX, RAX_H, RDX, RDX_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H, --- 419,429 ---- R11, R11_H, R13, R13_H, R14, R14_H); // Class for all long registers (excluding RSP and RBP) ! reg_class long_reg0_no_rbp(RAX, RAX_H, RDX, RDX_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H,
*** 345,358 **** R11, R11_H, R13, R13_H, R14, R14_H); // Dynamic register class that selects between long_reg_no_rbp and long_reg_with_rbp. ! reg_class_dynamic long_reg(long_reg_no_rbp, long_reg_with_rbp, %{ PreserveFramePointer %}); // Class for all long registers (excluding RAX, RDX and RSP) ! reg_class long_no_rax_rdx_reg_with_rbp(RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H, R8, R8_H, --- 433,446 ---- R11, R11_H, R13, R13_H, R14, R14_H); // Dynamic register class that selects between long_reg_no_rbp and long_reg_with_rbp. ! reg_class_dynamic long_reg0(long_reg0_no_rbp, long_reg0_with_rbp, %{ PreserveFramePointer %}); // Class for all long registers (excluding RAX, RDX and RSP) ! reg_class long_no_rax_rdx_reg0_with_rbp(RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H, R8, R8_H,
*** 361,371 **** R11, R11_H, R13, R13_H, R14, R14_H); // Class for all long registers (excluding RAX, RDX, RSP, and RBP) ! reg_class long_no_rax_rdx_reg_no_rbp(RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H, R8, R8_H, R9, R9_H, --- 449,459 ---- R11, R11_H, R13, R13_H, R14, R14_H); // Class for all long registers (excluding RAX, RDX, RSP, and RBP) ! reg_class long_no_rax_rdx_reg0_no_rbp(RDI, RDI_H, RSI, RSI_H, RCX, RCX_H, RBX, RBX_H, R8, R8_H, R9, R9_H,
*** 373,386 **** R11, R11_H, R13, R13_H, R14, R14_H); // Dynamic register class that selects between long_no_rax_rdx_reg_no_rbp and long_no_rax_rdx_reg_with_rbp. ! reg_class_dynamic long_no_rax_rdx_reg(long_no_rax_rdx_reg_no_rbp, long_no_rax_rdx_reg_with_rbp, %{ PreserveFramePointer %}); // Class for all long registers (excluding RCX and RSP) ! reg_class long_no_rcx_reg_with_rbp(RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RAX, RAX_H, RDX, RDX_H, RBX, RBX_H, --- 461,474 ---- R11, R11_H, R13, R13_H, R14, R14_H); // Dynamic register class that selects between long_no_rax_rdx_reg_no_rbp and long_no_rax_rdx_reg_with_rbp. ! reg_class_dynamic long_no_rax_rdx_reg0(long_no_rax_rdx_reg0_no_rbp, long_no_rax_rdx_reg0_with_rbp, %{ PreserveFramePointer %}); // Class for all long registers (excluding RCX and RSP) ! reg_class long_no_rcx_reg0_with_rbp(RBP, RBP_H, RDI, RDI_H, RSI, RSI_H, RAX, RAX_H, RDX, RDX_H, RBX, RBX_H,
*** 390,400 **** R11, R11_H, R13, R13_H, R14, R14_H); // Class for all long registers (excluding RCX, RSP, and RBP) ! reg_class long_no_rcx_reg_no_rbp(RDI, RDI_H, RSI, RSI_H, RAX, RAX_H, RDX, RDX_H, RBX, RBX_H, R8, R8_H, --- 478,488 ---- R11, R11_H, R13, R13_H, R14, R14_H); // Class for all long registers (excluding RCX, RSP, and RBP) ! reg_class long_no_rcx_reg0_no_rbp(RDI, RDI_H, RSI, RSI_H, RAX, RAX_H, RDX, RDX_H, RBX, RBX_H, R8, R8_H,
*** 403,413 **** R11, R11_H, R13, R13_H, R14, R14_H); // Dynamic register class that selects between long_no_rcx_reg_no_rbp and long_no_rcx_reg_with_rbp. ! reg_class_dynamic long_no_rcx_reg(long_no_rcx_reg_no_rbp, long_no_rcx_reg_with_rbp, %{ PreserveFramePointer %}); // Singleton class for RAX long register reg_class long_rax_reg(RAX, RAX_H); // Singleton class for RCX long register --- 491,501 ---- R11, R11_H, R13, R13_H, R14, R14_H); // Dynamic register class that selects between long_no_rcx_reg_no_rbp and long_no_rcx_reg_with_rbp. ! reg_class_dynamic long_no_rcx_reg0(long_no_rcx_reg0_no_rbp, long_no_rcx_reg0_with_rbp, %{ PreserveFramePointer %}); // Singleton class for RAX long register reg_class long_rax_reg(RAX, RAX_H); // Singleton class for RCX long register
*** 415,425 **** // Singleton class for RDX long register reg_class long_rdx_reg(RDX, RDX_H); // Class for all int registers (excluding RSP) ! reg_class int_reg_with_rbp(RAX, RDX, RBP, RDI, RSI, RCX, --- 503,513 ---- // Singleton class for RDX long register reg_class long_rdx_reg(RDX, RDX_H); // Class for all int registers (excluding RSP) ! reg_class int_reg0_with_rbp(RAX, RDX, RBP, RDI, RSI, RCX,
*** 430,440 **** R11, R13, R14); // Class for all int registers (excluding RSP and RBP) ! reg_class int_reg_no_rbp(RAX, RDX, RDI, RSI, RCX, RBX, --- 518,528 ---- R11, R13, R14); // Class for all int registers (excluding RSP and RBP) ! reg_class int_reg0_no_rbp(RAX, RDX, RDI, RSI, RCX, RBX,
*** 444,457 **** R11, R13, R14); // Dynamic register class that selects between int_reg_no_rbp and int_reg_with_rbp. ! reg_class_dynamic int_reg(int_reg_no_rbp, int_reg_with_rbp, %{ PreserveFramePointer %}); // Class for all int registers (excluding RCX and RSP) ! reg_class int_no_rcx_reg_with_rbp(RAX, RDX, RBP, RDI, RSI, RBX, --- 532,545 ---- R11, R13, R14); // Dynamic register class that selects between int_reg_no_rbp and int_reg_with_rbp. ! reg_class_dynamic int_reg0(int_reg0_no_rbp, int_reg0_with_rbp, %{ PreserveFramePointer %}); // Class for all int registers (excluding RCX and RSP) ! reg_class int_no_rcx_reg0_with_rbp(RAX, RDX, RBP, RDI, RSI, RBX,
*** 461,471 **** R11, R13, R14); // Class for all int registers (excluding RCX, RSP, and RBP) ! reg_class int_no_rcx_reg_no_rbp(RAX, RDX, RDI, RSI, RBX, R8, --- 549,559 ---- R11, R13, R14); // Class for all int registers (excluding RCX, RSP, and RBP) ! reg_class int_no_rcx_reg0_no_rbp(RAX, RDX, RDI, RSI, RBX, R8,
*** 474,487 **** R11, R13, R14); // Dynamic register class that selects between int_no_rcx_reg_no_rbp and int_no_rcx_reg_with_rbp. ! reg_class_dynamic int_no_rcx_reg(int_no_rcx_reg_no_rbp, int_no_rcx_reg_with_rbp, %{ PreserveFramePointer %}); // Class for all int registers (excluding RAX, RDX, and RSP) ! reg_class int_no_rax_rdx_reg_with_rbp(RBP, RDI, RSI, RCX, RBX, R8, --- 562,575 ---- R11, R13, R14); // Dynamic register class that selects between int_no_rcx_reg_no_rbp and int_no_rcx_reg_with_rbp. ! reg_class_dynamic int_no_rcx_reg0(int_no_rcx_reg0_no_rbp, int_no_rcx_reg0_with_rbp, %{ PreserveFramePointer %}); // Class for all int registers (excluding RAX, RDX, and RSP) ! reg_class int_no_rax_rdx_reg0_with_rbp(RBP, RDI, RSI, RCX, RBX, R8,
*** 490,500 **** R11, R13, R14); // Class for all int registers (excluding RAX, RDX, RSP, and RBP) ! reg_class int_no_rax_rdx_reg_no_rbp(RDI, RSI, RCX, RBX, R8, R9, --- 578,588 ---- R11, R13, R14); // Class for all int registers (excluding RAX, RDX, RSP, and RBP) ! reg_class int_no_rax_rdx_reg0_no_rbp(RDI, RSI, RCX, RBX, R8, R9,
*** 502,512 **** R11, R13, R14); // Dynamic register class that selects between int_no_rax_rdx_reg_no_rbp and int_no_rax_rdx_reg_with_rbp. ! reg_class_dynamic int_no_rax_rdx_reg(int_no_rax_rdx_reg_no_rbp, int_no_rax_rdx_reg_with_rbp, %{ PreserveFramePointer %}); // Singleton class for RAX int register reg_class int_rax_reg(RAX); // Singleton class for RBX int register --- 590,600 ---- R11, R13, R14); // Dynamic register class that selects between int_no_rax_rdx_reg_no_rbp and int_no_rax_rdx_reg_with_rbp. ! reg_class_dynamic int_no_rax_rdx_reg0(int_no_rax_rdx_reg0_no_rbp, int_no_rax_rdx_reg0_with_rbp, %{ PreserveFramePointer %}); // Singleton class for RAX int register reg_class int_rax_reg(RAX); // Singleton class for RBX int register
*** 527,542 **** --- 615,753 ---- %} //----------SOURCE BLOCK------------------------------------------------------- // This is a block of C++ code which provides values, functions, and // definitions necessary in the rest of the architecture description + source_hpp %{ + + extern RegMask _ANY_REG_mask; + extern RegMask _PTR_REG_mask; + extern RegMask _PTR_REG_NO_RBP_mask; + extern RegMask _PTR_NO_RAX_REG_mask; + extern RegMask _PTR_NO_RAX_RBX_REG_mask; + extern RegMask _LONG_REG_mask; + extern RegMask _LONG_NO_RAX_RDX_REG_mask; + extern RegMask _LONG_NO_RCX_REG_mask; + extern RegMask _INT_REG_mask; + extern RegMask _INT_NO_RAX_RDX_REG_mask; + extern RegMask _INT_NO_RCX_REG_mask; + + extern RegMask _STACK_OR_PTR_REG_mask; + extern RegMask _STACK_OR_LONG_REG_mask; + extern RegMask _STACK_OR_INT_REG_mask; + + inline const RegMask& STACK_OR_PTR_REG_mask() { return _STACK_OR_PTR_REG_mask; } + inline const RegMask& STACK_OR_LONG_REG_mask() { return _STACK_OR_LONG_REG_mask; } + inline const RegMask& STACK_OR_INT_REG_mask() { return _STACK_OR_INT_REG_mask; } + + %} + source %{ #define RELOC_IMM64 Assembler::imm_operand #define RELOC_DISP32 Assembler::disp32_operand #define __ _masm. + RegMask _ANY_REG_mask; + RegMask _PTR_REG_mask; + RegMask _PTR_REG_NO_RBP_mask; + RegMask _PTR_NO_RAX_REG_mask; + RegMask _PTR_NO_RAX_RBX_REG_mask; + RegMask _LONG_REG_mask; + RegMask _LONG_NO_RAX_RDX_REG_mask; + RegMask _LONG_NO_RCX_REG_mask; + RegMask _INT_REG_mask; + RegMask _INT_NO_RAX_RDX_REG_mask; + RegMask _INT_NO_RCX_REG_mask; + RegMask _STACK_OR_PTR_REG_mask; + RegMask _STACK_OR_LONG_REG_mask; + RegMask _STACK_OR_INT_REG_mask; + + #ifdef ASSERT + static bool same_mask(const RegMask &a, const RegMask &b) { + RegMask a_sub_b = a; a_sub_b.SUBTRACT(b); + RegMask b_sub_a = b; b_sub_a.SUBTRACT(a); + return a_sub_b.Size() == 0 && b_sub_a.Size() == 0; + } + #endif + + void reg_mask_init() { + // _ALL_REG_mask is generated by adlc from the all_reg register class below. + // We derive a number of subsets from it. + _ANY_REG_mask = _ALL_REG_mask; + + if (PreserveFramePointer) { + _ANY_REG_mask.Remove(OptoReg::as_OptoReg(rbp->as_VMReg())); + _ANY_REG_mask.Remove(OptoReg::as_OptoReg(rbp->as_VMReg()->next())); + } + + _PTR_REG_mask = _ANY_REG_mask; + _PTR_REG_mask.Remove(OptoReg::as_OptoReg(r12->as_VMReg())); + _PTR_REG_mask.Remove(OptoReg::as_OptoReg(r12->as_VMReg()->next())); + _PTR_REG_mask.Remove(OptoReg::as_OptoReg(rsp->as_VMReg())); + _PTR_REG_mask.Remove(OptoReg::as_OptoReg(rsp->as_VMReg()->next())); + _PTR_REG_mask.Remove(OptoReg::as_OptoReg(r15->as_VMReg())); + _PTR_REG_mask.Remove(OptoReg::as_OptoReg(r15->as_VMReg()->next())); + + _STACK_OR_PTR_REG_mask = _PTR_REG_mask; + _STACK_OR_PTR_REG_mask.OR(STACK_OR_STACK_SLOTS_mask()); + + _PTR_REG_NO_RBP_mask = _PTR_REG_mask; + _PTR_REG_NO_RBP_mask.Remove(OptoReg::as_OptoReg(rbp->as_VMReg())); + _PTR_REG_NO_RBP_mask.Remove(OptoReg::as_OptoReg(rbp->as_VMReg()->next())); + + _PTR_NO_RAX_REG_mask = _PTR_REG_mask; + _PTR_NO_RAX_REG_mask.Remove(OptoReg::as_OptoReg(rax->as_VMReg())); + _PTR_NO_RAX_REG_mask.Remove(OptoReg::as_OptoReg(rax->as_VMReg()->next())); + + _PTR_NO_RAX_RBX_REG_mask = _PTR_NO_RAX_REG_mask; + _PTR_NO_RAX_RBX_REG_mask.Remove(OptoReg::as_OptoReg(rbx->as_VMReg())); + _PTR_NO_RAX_RBX_REG_mask.Remove(OptoReg::as_OptoReg(rbx->as_VMReg()->next())); + + _LONG_REG_mask = _PTR_REG_mask; + _STACK_OR_LONG_REG_mask = _LONG_REG_mask; + _STACK_OR_LONG_REG_mask.OR(STACK_OR_STACK_SLOTS_mask()); + + _LONG_NO_RAX_RDX_REG_mask = _LONG_REG_mask; + _LONG_NO_RAX_RDX_REG_mask.Remove(OptoReg::as_OptoReg(rax->as_VMReg())); + _LONG_NO_RAX_RDX_REG_mask.Remove(OptoReg::as_OptoReg(rax->as_VMReg()->next())); + _LONG_NO_RAX_RDX_REG_mask.Remove(OptoReg::as_OptoReg(rdx->as_VMReg())); + _LONG_NO_RAX_RDX_REG_mask.Remove(OptoReg::as_OptoReg(rdx->as_VMReg()->next())); + + _LONG_NO_RCX_REG_mask = _LONG_REG_mask; + _LONG_NO_RCX_REG_mask.Remove(OptoReg::as_OptoReg(rcx->as_VMReg())); + _LONG_NO_RCX_REG_mask.Remove(OptoReg::as_OptoReg(rcx->as_VMReg()->next())); + + _INT_REG_mask = _ALL_INT_REG_mask; + _INT_REG_mask.Remove(OptoReg::as_OptoReg(r12->as_VMReg())); + if (PreserveFramePointer) { + _INT_REG_mask.Remove(OptoReg::as_OptoReg(rbp->as_VMReg())); + } + + _STACK_OR_INT_REG_mask = _INT_REG_mask; + _STACK_OR_INT_REG_mask.OR(STACK_OR_STACK_SLOTS_mask()); + + _INT_NO_RAX_RDX_REG_mask = _INT_REG_mask; + _INT_NO_RAX_RDX_REG_mask.Remove(OptoReg::as_OptoReg(rax->as_VMReg())); + _INT_NO_RAX_RDX_REG_mask.Remove(OptoReg::as_OptoReg(rdx->as_VMReg())); + + _INT_NO_RCX_REG_mask = _INT_REG_mask; + _INT_NO_RCX_REG_mask.Remove(OptoReg::as_OptoReg(rcx->as_VMReg())); + + assert(same_mask(_ANY_REG_mask, ANY_REG0_mask()), "!"); + assert(same_mask(_PTR_REG_mask, PTR_REG0_mask()), "!"); + assert(same_mask(_PTR_REG_NO_RBP_mask, PTR_REG0_NO_RBP_mask()), "!"); + assert(same_mask(_PTR_NO_RAX_REG_mask, PTR_NO_RAX_REG0_mask()), "!"); + assert(same_mask(_PTR_NO_RAX_RBX_REG_mask, PTR_NO_RAX_RBX_REG0_mask()), "!"); + assert(same_mask(_LONG_REG_mask, LONG_REG0_mask()), "!"); + assert(same_mask(_LONG_NO_RAX_RDX_REG_mask, LONG_NO_RAX_RDX_REG0_mask()), "!"); + assert(same_mask(_LONG_NO_RCX_REG_mask, LONG_NO_RCX_REG0_mask()), "!"); + assert(same_mask(_INT_REG_mask, INT_REG0_mask()), "!"); + assert(same_mask(_INT_NO_RAX_RDX_REG_mask, INT_NO_RAX_RDX_REG0_mask()), "!"); + assert(same_mask(_INT_NO_RCX_REG_mask, INT_NO_RCX_REG0_mask()), "!"); + } + static bool generate_vzeroupper(Compile* C) { return (VM_Version::supports_vzeroupper() && (C->max_vector_size() > 16 || C->clear_upper_avx() == true)) ? true: false; // Generate vzeroupper } static int clear_avx_size() {
< prev index next >