equal
deleted
inserted
replaced
23 */ |
23 */ |
24 |
24 |
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "opto/compile.hpp" |
26 #include "opto/compile.hpp" |
27 #include "opto/node.hpp" |
27 #include "opto/node.hpp" |
|
28 #include "opto/optoreg.hpp" |
28 |
29 |
29 // processor dependent initialization for i486 |
30 // processor dependent initialization for i486 |
30 |
31 |
31 void Compile::pd_compiler2_init() { |
32 void Compile::pd_compiler2_init() { |
32 guarantee(CodeEntryAlignment >= InteriorEntryAlignment, "" ); |
33 guarantee(CodeEntryAlignment >= InteriorEntryAlignment, "" ); |
35 #ifndef AMD64 |
36 #ifndef AMD64 |
36 if (!VM_Version::supports_cmov()) { |
37 if (!VM_Version::supports_cmov()) { |
37 ConditionalMoveLimit = 0; |
38 ConditionalMoveLimit = 0; |
38 } |
39 } |
39 #endif // AMD64 |
40 #endif // AMD64 |
|
41 |
|
42 if (UseAVX < 3) { |
|
43 int delta = XMMRegisterImpl::max_slots_per_register * XMMRegisterImpl::number_of_registers; |
|
44 int bottom = ConcreteRegisterImpl::max_fpr; |
|
45 int top = bottom + delta; |
|
46 int middle = bottom + (delta / 2); |
|
47 int xmm_slots = XMMRegisterImpl::max_slots_per_register; |
|
48 int lower = xmm_slots / 2; |
|
49 // mark bad every register that we cannot get to if AVX less than 3, we have all slots in the array |
|
50 // Note: vm2opto is allocated to ConcreteRegisterImpl::number_of_registers |
|
51 for (int i = bottom; i < middle; i += xmm_slots) { |
|
52 for (OptoReg::Name j = OptoReg::Name(i + lower); j<OptoReg::Name(i + xmm_slots); j = OptoReg::add(j, 1)) { |
|
53 OptoReg::invalidate(j); |
|
54 } |
|
55 } |
|
56 // mark the upper zmm bank bad and all the mask registers bad in this case |
|
57 for (OptoReg::Name i = OptoReg::Name(middle); i<OptoReg::Name(_last_Mach_Reg - 1); i = OptoReg::add(i, 1)) { |
|
58 OptoReg::invalidate(i); |
|
59 } |
|
60 } |
40 } |
61 } |