-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
[clang] 32bit pointer (-fms-extensions __ptr32 __uptr) has no effect in ARM64 #62536
Labels
Comments
@llvm/issue-subscribers-backend-aarch64 |
dpaoliello
added a commit
that referenced
this issue
Oct 15, 2024
…, __sptr, __uptr for AArch64 (#111879) MSVC has a set of qualifiers to allow using 32-bit signed/unsigned pointers when building 64-bit targets. This is useful for WoW code (i.e., the part of Windows that handles running 32-bit application on a 64-bit OS). Currently this is supported on x64 using the 270, 271 and 272 address spaces, but does not work for AArch64 at all. This change adds the same 270, 271 and 272 address spaces to AArch64 and adjusts the data layout string accordingly. Clang will generate the correct address space casts, but these will currently be ignored until the AArch64 backend is updated to handle them. Partially fixes #62536 This is a resurrected version of <https://reviews.llvm.org/D158857> (originally created by @a_vorobev) - I've cleaned it up a little, fixed the rest of the tests and added to auto-upgrade for the data layout.
DanielCChen
pushed a commit
to DanielCChen/llvm-project
that referenced
this issue
Oct 16, 2024
…, __sptr, __uptr for AArch64 (llvm#111879) MSVC has a set of qualifiers to allow using 32-bit signed/unsigned pointers when building 64-bit targets. This is useful for WoW code (i.e., the part of Windows that handles running 32-bit application on a 64-bit OS). Currently this is supported on x64 using the 270, 271 and 272 address spaces, but does not work for AArch64 at all. This change adds the same 270, 271 and 272 address spaces to AArch64 and adjusts the data layout string accordingly. Clang will generate the correct address space casts, but these will currently be ignored until the AArch64 backend is updated to handle them. Partially fixes llvm#62536 This is a resurrected version of <https://reviews.llvm.org/D158857> (originally created by @a_vorobev) - I've cleaned it up a little, fixed the rest of the tests and added to auto-upgrade for the data layout.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
The 32-bit pointer does not work on platforms other than x64, such as Arm64. See the Godbolt listing.
Sample
Conclusions
The
param_ptr32
disassembler must be equal toemulate_ptr32
, and different fromparam_std
. Based on the Godbolt listing, the MSVC compiler does just that. But Clang does not take into account the 32-bit pointer under Arm64 (and most likely under other than x64). Its size is 8 bytes, disassemblerparam_std
andparam_ptr32
are the same.The text was updated successfully, but these errors were encountered: