Skip to content

Commit

Permalink
Fix trimming issue in the cpuid test (dotnet#89989)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky authored Aug 4, 2023
1 parent 45e1e2c commit f97a4b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tests/JIT/HardwareIntrinsics/X86/X86Base/CpuId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

using System;
using System.Diagnostics.CodeAnalysis;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
Expand Down Expand Up @@ -370,7 +371,7 @@ public unsafe static void CpuId()
return;
}

static bool IsBitIncorrect(int register, int bitNumber, Type isa, bool isSupported, string name, ref bool isHierarchyDisabled)
static bool IsBitIncorrect(int register, int bitNumber, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] Type isa, bool isSupported, string name, ref bool isHierarchyDisabled)
{
bool isSupportedByHardware = (register & (1 << bitNumber)) != 0;
isHierarchyDisabled |= (!isSupported || !GetDotnetEnable(name));
Expand Down Expand Up @@ -412,7 +413,7 @@ static bool IsBitIncorrect(int register, int bitNumber, Type isa, bool isSupport
return false;
}

static bool IsIncorrect(Type isa, bool isHardwareAccelerated, bool isHierarchyDisabled)
static bool IsIncorrect([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] Type isa, bool isHardwareAccelerated, bool isHierarchyDisabled)
{
if (isHardwareAccelerated)
{
Expand Down

0 comments on commit f97a4b3

Please sign in to comment.