[PATCH] D155012: Fix types of arm64 MSVC __readx18/__writex18 intrinsics

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 11 13:16:44 PDT 2023


ahatanak created this revision.
ahatanak added reviewers: ravikandhadai, Bigcheese, steplong.
ahatanak added a project: clang.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
ahatanak requested review of this revision.
Herald added a subscriber: wangpc.

Using `L` for type `long` results in clang passing 64-bit integers to these intrinsics on LP64 operating systems. This isn't correct as the intrinsics accept 32-bit integers.

Use `N` instead of `L` so that 32-bit integers are passed to the intrinsics on LP64 operating systems too. This is the same fix as the following two commits:

33703fb9f908113f93bd9af83a79eb56f5131735
afa47c91ce5085d446ebb5ac1312dc98b6a68a6c


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155012

Files:
  clang/include/clang/Basic/BuiltinsAArch64.def
  clang/test/CodeGen/arm64-microsoft-intrinsics.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155012.539258.patch
Type: text/x-patch
Size: 16129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230711/a3c1c95b/attachment.bin>


More information about the cfe-commits mailing list