Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/native/minipal/cpufeatures.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

#include <Windows.h>

#ifndef PF_ARM_SVE_INSTRUCTIONS_AVAILABLE
#define PF_ARM_SVE_INSTRUCTIONS_AVAILABLE (46)
#endif

#else // HOST_WINDOWS

#include "minipalconfig.h"
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this give us parity between Linux/Windows at this point or are there others that are still missing on Windows that Linux currently handles?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARM64IntrinsicConstants_Rcpc2 and ARM64IntrinsicConstants_Rdm are still missing and I didn't see their equivalent yet on windows side.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LRCPC2 is supported since Windows 11 22H2.

I don't see an entry of LRCPC2 in that. It just has LRCPC that is mapped to 45.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's not LRCPC2. Not a big deal though, it's just a minor optimization on top of RCPC1

}

#endif // HOST_WINDOWS

#endif // HOST_ARM64
Expand Down