Skip to content

Commit 8a82c6c

Browse files
authored
Arm64: Add SVE feature detection for Windows (#100937)
* Add SVE feature detection for Windows * Move the PF_ARM_SVE_INSTRUCTIONS_AVAILABLE under HOST_WINDOWS
1 parent 3560f84 commit 8a82c6c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/native/minipal/cpufeatures.c

+9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
#include <Windows.h>
1414

15+
#ifndef PF_ARM_SVE_INSTRUCTIONS_AVAILABLE
16+
#define PF_ARM_SVE_INSTRUCTIONS_AVAILABLE (46)
17+
#endif
18+
1519
#else // HOST_WINDOWS
1620

1721
#include "minipalconfig.h"
@@ -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)