Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify arm64ec as aarch64 instead of x64 #323

Open
sivileri opened this issue Jul 12, 2023 · 2 comments
Open

Identify arm64ec as aarch64 instead of x64 #323

sivileri opened this issue Jul 12, 2023 · 2 comments

Comments

@sivileri
Copy link

ARM64EC is a new build target for Windows ARM64 devices for x64 support.
Currently that build flavor fails in Blake3 due to attempting to use the x64 intrinsics instead of the aarch64 ones.

Please see this related change with a possible way to fix it.

@oconnor663
Copy link
Member

Thanks for the report, we should definitely fix this. The second line changed in that diff makes sense to me, but I'm surprised by this first line:

#if (defined(__x86_64__) || defined(_M_X64)) && !defined(_M_ARM64EC)

Why is that needed? Is _M_X64 defined when _M_ARM64EC is defined?

@elichai
Copy link
Contributor

elichai commented Jul 13, 2023

Why is that needed? Is _M_X64 defined when _M_ARM64EC is defined?

According to: https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170:

_M_X64 Defined as the integer literal value 100 for compilations that target x64 processors or ARM64EC. Otherwise, undefined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants