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

Use _M_X64 only without mixing with _M_AMD64 #1000

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

pps83
Copy link
Contributor

@pps83 pps83 commented Jan 21, 2025

No description provided.

@Cyan4973 Cyan4973 self-assigned this Jan 22, 2025
@Cyan4973
Copy link
Owner

Note: CI errors seem unrelated to this PR, and should disappear after rebasing on top of latest dev branch.

@Cyan4973
Copy link
Owner

_M_X64 seems indeed redundant with _M_AMD64,
so I agree with the simplification keeping only one.

Is there a specific reason you would prefer _M_X64 ?
I was under the impression that _M_AMD64 was more common.

@pps83
Copy link
Contributor Author

pps83 commented Jan 23, 2025

I was under the impression that _M_AMD64 was more common.

No, _M_X64 is more common.

@t-mat
Copy link
Contributor

t-mat commented Jan 23, 2025

Some notes for future contributors.

As for MSVC

MACRO Revisited

https://learn.microsoft.com/en-us/archive/blogs/reiley/macro-revisited
_M_AMD64 and _M_X64 are equivalent.

Not sure about icc though.

It proves nothing, but according to sourcegraph.com:

Also, it seems microsoft/STL uses _M_X64 as a canonical symbol for x86-64.

#elif defined(_M_IX86) || defined(_M_X64) // ^^^ ARM64/ARM64EC/HYBRID_X86_ARM64 / x86/x64 vvv

@pps83
Copy link
Contributor Author

pps83 commented Jan 23, 2025

Not sure about icc though.

if that's old intel compiler, then likely they would blacklist anything mentioning amd :)
new intel compiler uses clang front-end

@pps83
Copy link
Contributor Author

pps83 commented Jan 24, 2025

ping @Cyan4973 seems like this is ok to merge as well

@Cyan4973 Cyan4973 merged commit e4e33f1 into Cyan4973:dev Jan 24, 2025
59 of 63 checks passed
@pps83 pps83 deleted the dev-x64test branch January 24, 2025 01:04
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

Successfully merging this pull request may close these issues.

3 participants