--- old/src/cpu/x86/vm/c2_init_x86.cpp 2015-05-08 11:59:15.000000000 -0700 +++ new/src/cpu/x86/vm/c2_init_x86.cpp 2015-05-08 11:59:15.000000000 -0700 @@ -25,6 +25,7 @@ #include "precompiled.hpp" #include "opto/compile.hpp" #include "opto/node.hpp" +#include "opto/optoreg.hpp" // processor dependent initialization for i486 @@ -37,4 +38,24 @@ ConditionalMoveLimit = 0; } #endif // AMD64 + + if (UseAVX < 3) { + int delta = XMMRegisterImpl::max_slots_per_register * XMMRegisterImpl::number_of_registers; + int bottom = ConcreteRegisterImpl::max_fpr; + int top = bottom + delta; + int middle = bottom + (delta / 2); + int xmm_slots = XMMRegisterImpl::max_slots_per_register; + int lower = xmm_slots / 2; + // mark bad every register that we cannot get to if AVX less than 3, we have all slots in the array + // Note: vm2opto is allocated to ConcreteRegisterImpl::number_of_registers + for (int i = bottom; i < middle; i += xmm_slots) { + for (OptoReg::Name j = OptoReg::Name(i + lower); j