src/cpu/x86/vm/c2_init_x86.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8076276 Sdiff src/cpu/x86/vm

src/cpu/x86/vm/c2_init_x86.cpp

Print this page
rev 8344 : 8076276: Add support for AVX512
Reviewed-by: kvn, roland
Contributed-by: michael.c.berg@intel.com


   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "opto/compile.hpp"
  27 #include "opto/node.hpp"

  28 
  29 // processor dependent initialization for i486
  30 
  31 void Compile::pd_compiler2_init() {
  32   guarantee(CodeEntryAlignment >= InteriorEntryAlignment, "" );
  33   // QQQ presumably all 64bit cpu's support this. Seems like the ifdef could
  34   // simply be left out.
  35 #ifndef AMD64
  36   if (!VM_Version::supports_cmov()) {
  37     ConditionalMoveLimit = 0;
  38   }
  39 #endif // AMD64




















  40 }


   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "opto/compile.hpp"
  27 #include "opto/node.hpp"
  28 #include "opto/optoreg.hpp"
  29 
  30 // processor dependent initialization for i486
  31 
  32 void Compile::pd_compiler2_init() {
  33   guarantee(CodeEntryAlignment >= InteriorEntryAlignment, "" );
  34   // QQQ presumably all 64bit cpu's support this. Seems like the ifdef could
  35   // simply be left out.
  36 #ifndef AMD64
  37   if (!VM_Version::supports_cmov()) {
  38     ConditionalMoveLimit = 0;
  39   }
  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   }
  61 }
src/cpu/x86/vm/c2_init_x86.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File