Skip to content

Commit

Permalink
Add SVE feature detection for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalspathak committed Apr 11, 2024
1 parent 19ec4b6 commit ed7c781
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/native/minipal/cpufeatures.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ static uint32_t xmmYmmStateSupport()
#define XSTATE_MASK_AVX512 (0xE0) /* 0b1110_0000 */
#endif // XSTATE_MASK_AVX512

#ifndef PF_ARM_SVE_INSTRUCTIONS_AVAILABLE
#define PF_ARM_SVE_INSTRUCTIONS_AVAILABLE (46)
#endif

static uint32_t avx512StateSupport()
{
#if defined(HOST_APPLE)
Expand Down Expand Up @@ -458,6 +462,11 @@ int minipal_getcpufeatures(void)

// TODO: IsProcessorFeaturePresent doesn't support LRCPC2 yet.

if (IsProcessorFeaturePresent(PF_ARM_SVE_INSTRUCTIONS_AVAILABLE))
{
result |= ARM64IntrinsicConstants_Sve;
}

#endif // HOST_WINDOWS

#endif // HOST_ARM64
Expand Down

0 comments on commit ed7c781

Please sign in to comment.