Skip to content

Commit b5b96cc

Browse files
committed
Ensure that 64 bit variants of instruction sets are handled correctly
- Make sure to enable them based on the related 32bit instruction sets before disabling instruction sets that are enabled but not compatible with the instruction set hierarchy the runtime is designed for.
1 parent 7c98b9c commit b5b96cc

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/coreclr/src/pal/src/misc/jitsupport.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,5 @@ PAL_GetJitCpuCapabilityFlags(CORJIT_FLAGS *flags)
126126
#endif // HAVE_AUXV_HWCAP_H
127127
#endif // defined(HOST_ARM64)
128128
CPUCompileFlags.Set64BitInstructionSetVariants();
129+
CPUCompileFlags.EnsureValidInstructionSetSupport();
129130
}

src/coreclr/src/vm/codeman.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,8 +1454,6 @@ void EEJitManager::SetCpuInfo()
14541454
CPUCompileFlags.Set(InstructionSet_BMI2);
14551455
}
14561456
}
1457-
1458-
CPUCompileFlags.EnsureValidInstructionSetSupport();
14591457
}
14601458

14611459
DWORD maxCpuIdEx = getcpuid(0x80000000, buffer);
@@ -1503,6 +1501,7 @@ void EEJitManager::SetCpuInfo()
15031501
#endif // TARGET_ARM64
15041502

15051503
CPUCompileFlags.Set64BitInstructionSetVariants();
1504+
CPUCompileFlags.EnsureValidInstructionSetSupport();
15061505

15071506
m_CPUCompileFlags = CPUCompileFlags;
15081507
}

src/coreclr/src/zap/zapper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,7 @@ void Zapper::InitializeCompilerFlags(CORCOMPILE_VERSION_INFO * pVersionInfo)
12231223
}
12241224
#endif // defined(TARGET_X86) || defined(TARGET_AMD64) || defined(TARGET_ARM64)
12251225
m_pOpt->m_compilerFlags.Set64BitInstructionSetVariants();
1226+
m_pOpt->m_compilerFlags.EnsureValidInstructionSetSupport();
12261227

12271228
if ( m_pOpt->m_compilerFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_INFO)
12281229
&& m_pOpt->m_compilerFlags.IsSet(CORJIT_FLAGS::CORJIT_FLAG_DEBUG_CODE)

0 commit comments

Comments
 (0)