[PATCH] D145563: [AArch64] Assembly Support for FEAT_GCS/FEAT_CHK

Sam Elliott via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 8 02:36:01 PST 2023


lenary created this revision.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
lenary requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

This implements support for two new 2022 A-profile extensions:

- FEAT_CHK - Check Feature Status Extension
- FEAT_GCS - Guarded Control Stacks

FEAT_CHK is mandatory from armv8.0-a, but is in the hint space so
there's no clang command-line flag for it, and we only print the hint as
`chkfeat x16` at v8.9a and above, to be compatible when using a
non-integrated assembler that might not yet know about the extension.

FEAT_GCS is optional from armv9.4-a onwards. It is enabled using `+gcs`
in a clang `-march=` or `-mcpu=` option string, or using a
`.arch_extension gcs` assembly directive.

This patch includes changes by Ties Stuij, Tomas Matheson, and Keith
Walker.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145563

Files:
  clang/lib/Basic/Targets/AArch64.cpp
  clang/lib/Basic/Targets/AArch64.h
  llvm/include/llvm/TargetParser/AArch64TargetParser.h
  llvm/lib/Target/AArch64/AArch64.td
  llvm/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/lib/Target/AArch64/AArch64SystemOperands.td
  llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
  llvm/test/MC/AArch64/armv9.4a-chk.s
  llvm/test/MC/AArch64/armv9.4a-gcs.s
  llvm/test/MC/AArch64/directive-arch_extension-negative.s
  llvm/test/MC/AArch64/directive-arch_extension.s
  llvm/test/MC/Disassembler/AArch64/armv9.4a-chk.txt
  llvm/test/MC/Disassembler/AArch64/armv9.4a-gcs.txt
  llvm/unittests/TargetParser/TargetParserTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145563.503280.patch
Type: text/x-patch
Size: 24087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230308/dd51b9f2/attachment-0001.bin>


More information about the cfe-commits mailing list