Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In MSVC, ARM64EC is a variant of the Windows ARM64 ABI that allows mixing native ARM64 code and emulated x64 code in the same process. It is useful, e.g., for programs that need to be able to load legacy x64 plugin DLLs.
When building for ARM64EC,
_M_X64
is defined and many x64 intrinsics are available for compatibility. All ARM64 intrinsics are still available and while_M_ARM64
is not defined,_M_ARM64EC
is.Changes include:
_M_ARM64EC
like_M_ARM64
. In many cases this appears to be dead code because it's ignored whenCRYPTOPP_DISABLE_ASM
is set, which appears to be currently required for successful non-x64 Windows builds, but I've nevertheless made the changes everywhere for uniformity.winnt.h
(indirectly, by way ofminwindef.h
) to pick up the declarations of intrinsics like__shiftleft128
on ARM64EC, when necessary.For the actual build, I've used cryptopp-cmake with some tweaks for ARM64EC detection.
Verified by running the resulting ARM64EC build of
cryptest.exe v
on a Windows ARM64 device.