[PATCH] D158857: Add support for the MS qualifiers __ptr32, __ptr64, __sptr, __uptr for aarch64

Aleksandr Vorobev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 25 09:10:26 PDT 2023


a_vorobev created this revision.
a_vorobev added reviewers: clang, akhuang, rnk.
a_vorobev added a project: clang.
Herald added subscribers: pengfei, hiraditya, kristof.beyls, arichardson.
Herald added a project: All.
a_vorobev requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, aheejin.
Herald added a project: LLVM.

This is frontend patch for the issue : 62536 <https://github.com/llvm/llvm-project/issues/62536> . This patch adds -p270:32:32-p271:32:32-p272:64:64 to the aarch64 data layout string, which are used in X86 for implementing mixed pointer sizes. This patch also changes the datalayout string in aarch64 backend target, because the datalayout specified in the frontend has to match the backend target datalayout.

Additionally, the patch adds changes to clang/basic/target/aarch64 for the correct size of the pointer and its address in the IR. The address spaces: 270,271 and 271 already choised in X86 platform.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158857

Files:
  clang/lib/Basic/Targets/AArch64.cpp
  clang/lib/Basic/Targets/AArch64.h
  clang/test/CodeGen/ms-mixed-ptr-sizes.c
  llvm/lib/Target/AArch64/AArch64TargetMachine.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158857.553499.patch
Type: text/x-patch
Size: 10060 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230825/a975bc8b/attachment-0001.bin>


More information about the cfe-commits mailing list