From 3d3fd1a44c846195370f8d36b4dbf95638492c43 Mon Sep 17 00:00:00 2001 From: Bradley Wood Date: Thu, 20 Feb 2025 15:11:05 -0500 Subject: [PATCH] Guard xgetbv call to x86 in ProcessorDetection --- runtime/compiler/env/ProcessorDetection.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/compiler/env/ProcessorDetection.cpp b/runtime/compiler/env/ProcessorDetection.cpp index 99dc89c2be2..a854447199e 100644 --- a/runtime/compiler/env/ProcessorDetection.cpp +++ b/runtime/compiler/env/ProcessorDetection.cpp @@ -348,6 +348,7 @@ TR_J9VM::initializeProcessorType() bool disableAVX = true; bool disableAVX512 = true; +#if defined(TR_TARGET_X86) // Check XCRO register for OS support of xmm/ymm/zmm if (TRUE == omrsysinfo_processor_has_feature(&processorDescription, OMR_FEATURE_X86_OSXSAVE)) { @@ -356,6 +357,7 @@ TR_J9VM::initializeProcessorType() // 'e6' = (mask for XCR0[7:5]='111b' (Opmask, ZMM_Hi256, Hi16_ZMM) + XCR0[2:1]='11b' (XMM/YMM)) disableAVX512 = ((0xe6 & _xgetbv(0)) != 0xe6); } +#endif if (disableAVX) {