Skip to content

Commit

Permalink
Ensure that IsSupported being false disables the tracked hierachy in …
Browse files Browse the repository at this point in the history
…our tests (#88848)
  • Loading branch information
tannergooding authored Jul 14, 2023
1 parent 5a43a6f commit 9915e98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tests/JIT/HardwareIntrinsics/X86/X86Base/CpuId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public unsafe static void CpuId()
static bool IsBitIncorrect(int register, int bitNumber, Type isa, bool isSupported, string name, ref bool isHierarchyDisabled)
{
bool isSupportedByHardware = (register & (1 << bitNumber)) != 0;
isHierarchyDisabled |= !GetDotnetEnable(name);
isHierarchyDisabled |= (!isSupported || !GetDotnetEnable(name));

if (isSupported)
{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/readytorun/HardwareIntrinsics/X86/CpuId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public unsafe static int Main()
static bool IsBitIncorrect(int register, int bitNumber, Type isa, bool isSupported, string name, ref bool isHierarchyDisabled)
{
bool isSupportedByHardware = (register & (1 << bitNumber)) != 0;
isHierarchyDisabled |= !GetDotnetEnable(name);
isHierarchyDisabled |= (!isSupported || !GetDotnetEnable(name));

if (isSupported)
{
Expand Down

0 comments on commit 9915e98

Please sign in to comment.