Skip to content

Commit ed7c781

Browse files
committed
Add SVE feature detection for Windows
1 parent 19ec4b6 commit ed7c781

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/native/minipal/cpufeatures.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ static uint32_t xmmYmmStateSupport()
6565
#define XSTATE_MASK_AVX512 (0xE0) /* 0b1110_0000 */
6666
#endif // XSTATE_MASK_AVX512
6767

68+
#ifndef PF_ARM_SVE_INSTRUCTIONS_AVAILABLE
69+
#define PF_ARM_SVE_INSTRUCTIONS_AVAILABLE (46)
70+
#endif
71+
6872
static uint32_t avx512StateSupport()
6973
{
7074
#if defined(HOST_APPLE)
@@ -458,6 +462,11 @@ int minipal_getcpufeatures(void)
458462

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

465+
if (IsProcessorFeaturePresent(PF_ARM_SVE_INSTRUCTIONS_AVAILABLE))
466+
{
467+
result |= ARM64IntrinsicConstants_Sve;
468+
}
469+
461470
#endif // HOST_WINDOWS
462471

463472
#endif // HOST_ARM64

0 commit comments

Comments
 (0)