|
116 | 116 | #include <strings.h>
|
117 | 117 | #endif
|
118 | 118 |
|
119 |
| -#if defined(OMR_OS_WINDOWS) && defined(TR_TARGET_X86) |
120 |
| -#include <intrin.h> |
121 |
| -#elif defined(TR_TARGET_X86) |
122 |
| -inline unsigned long long _xgetbv(unsigned int ecx) |
123 |
| - { |
124 |
| - unsigned int eax, edx; |
125 |
| - __asm__ __volatile__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(ecx)); |
126 |
| - return ((unsigned long long)edx << 32) | eax; |
127 |
| - } |
128 |
| -#endif |
129 |
| - |
130 | 119 | #if defined(J9ZOS390)
|
131 | 120 | extern "C" bool _isPSWInProblemState(); /* 390 asm stub */
|
132 | 121 | #endif
|
@@ -345,43 +334,6 @@ TR_J9VM::initializeProcessorType()
|
345 | 334 | OMRProcessorDesc processorDescription = TR::Compiler->target.cpu.getProcessorDescription();
|
346 | 335 | OMRPORT_ACCESS_FROM_OMRPORT(TR::Compiler->omrPortLib);
|
347 | 336 |
|
348 |
| - bool disableAVX = true; |
349 |
| - bool disableAVX512 = true; |
350 |
| - |
351 |
| -#if defined(TR_TARGET_X86) |
352 |
| - // Check XCRO register for OS support of xmm/ymm/zmm |
353 |
| - if (TRUE == omrsysinfo_processor_has_feature(&processorDescription, OMR_FEATURE_X86_OSXSAVE)) |
354 |
| - { |
355 |
| - // '6' = mask for XCR0[2:1]='11b' (XMM state and YMM state are enabled) |
356 |
| - disableAVX = ((6 & _xgetbv(0)) != 6); |
357 |
| - // 'e6' = (mask for XCR0[7:5]='111b' (Opmask, ZMM_Hi256, Hi16_ZMM) + XCR0[2:1]='11b' (XMM/YMM)) |
358 |
| - disableAVX512 = ((0xe6 & _xgetbv(0)) != 0xe6); |
359 |
| - } |
360 |
| -#endif |
361 |
| - |
362 |
| - if (disableAVX) |
363 |
| - { |
364 |
| - // Unset AVX/AVX2 if not enabled via CR0 or otherwise disabled |
365 |
| - omrsysinfo_processor_set_feature(&processorDescription, OMR_FEATURE_X86_AVX, FALSE); |
366 |
| - omrsysinfo_processor_set_feature(&processorDescription, OMR_FEATURE_X86_AVX2, FALSE); |
367 |
| - } |
368 |
| - |
369 |
| - if (disableAVX512) |
370 |
| - { |
371 |
| - // Unset AVX-512 if not enabled via CR0 or otherwise disabled |
372 |
| - // If other AVX-512 extensions are supported in the port library, they need to be disabled here |
373 |
| - omrsysinfo_processor_set_feature(&processorDescription, OMR_FEATURE_X86_AVX512F, FALSE); |
374 |
| - omrsysinfo_processor_set_feature(&processorDescription, OMR_FEATURE_X86_AVX512VL, FALSE); |
375 |
| - omrsysinfo_processor_set_feature(&processorDescription, OMR_FEATURE_X86_AVX512BW, FALSE); |
376 |
| - omrsysinfo_processor_set_feature(&processorDescription, OMR_FEATURE_X86_AVX512CD, FALSE); |
377 |
| - omrsysinfo_processor_set_feature(&processorDescription, OMR_FEATURE_X86_AVX512DQ, FALSE); |
378 |
| - omrsysinfo_processor_set_feature(&processorDescription, OMR_FEATURE_X86_AVX512_BITALG, FALSE); |
379 |
| - omrsysinfo_processor_set_feature(&processorDescription, OMR_FEATURE_X86_AVX512_VBMI, FALSE); |
380 |
| - omrsysinfo_processor_set_feature(&processorDescription, OMR_FEATURE_X86_AVX512_VBMI2, FALSE); |
381 |
| - omrsysinfo_processor_set_feature(&processorDescription, OMR_FEATURE_X86_AVX512_VNNI, FALSE); |
382 |
| - omrsysinfo_processor_set_feature(&processorDescription, OMR_FEATURE_X86_AVX512_VPOPCNTDQ, FALSE); |
383 |
| - } |
384 |
| - |
385 | 337 | TR::Compiler->target.cpu = TR::CPU::customize(processorDescription);
|
386 | 338 |
|
387 | 339 | const char *vendor = TR::Compiler->target.cpu.getProcessorVendorId();
|
|
0 commit comments