[PATCH] D140222: [AArch64] Check 128-bit Sysreg Builtins

Sam Elliott via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 16 08:03:23 PST 2022


lenary created this revision.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
lenary requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This patch contains several related changes:

1. We move to using TARGET_BUILTIN for the 128-bit system register builtins to give better error messages when d128 has not been enabled, or has been enabled in a per-function manner.

2. We now validate the inputs to the 128-bit system register builtins, like we validate the other system register builtins.

3. We update the list of named PSTATE accessors for MSR (immediate), and now correctly enforce the expected ranges of the immediates. There is a long comment about how we chose to do this to comply with the ACLE when most of the PSTATE accessors for MSR (immediate) have aliased system registers for MRS/MSR which expect different values. In short, the MSR (immediate) names are prioritised, rather than falling-back to the register form when the value is out of range.

Depends on D140221 <https://reviews.llvm.org/D140221>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140222

Files:
  clang/include/clang/Basic/BuiltinsAArch64.def
  clang/lib/Headers/arm_acle.h
  clang/lib/Sema/SemaChecking.cpp
  clang/test/CodeGen/aarch64-sysregs-target.c
  clang/test/Sema/aarch64-special-register.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140222.483549.patch
Type: text/x-patch
Size: 13079 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221216/57e60d42/attachment.bin>


More information about the cfe-commits mailing list