[PATCH] D99079: [ARM][AArch64] Require appropriate features for crypto algorithms

David Candler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 08:01:26 PDT 2021


dcandler created this revision.
dcandler added reviewers: t.p.northover, rsanthir.quic, SjoerdMeijer, efriedma, peter.smith, labrinea.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
dcandler requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

This patch changes the AArch32 crypto instructions (sha2 and aes) to
require the specific sha2 or aes features. These features have
already been implemented and can be controlled through the command
line, but do not have the expected result (i.e. `+noaes` will not
disable aes instructions). The crypto feature retains its existing
meaning of both sha2 and aes.

Several small changes are included due to the knock-on effect this has:

- The AArch32 driver has been modified to ensure sha2/aes is correctly set based on arch/cpu/fpu selection and feature ordering.
- Crypto extensions are permitted for AArch32 v8-R profile, but not enabled by default.
- ACLE feature macros have been updated with the fine grained crypto algorithms. These are also used by AArch64.
- Various tests updated due to the change in feature lists and macros.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99079

Files:
  clang/include/clang/Basic/arm_neon.td
  clang/lib/Basic/Targets/AArch64.cpp
  clang/lib/Basic/Targets/AArch64.h
  clang/lib/Basic/Targets/ARM.cpp
  clang/lib/Basic/Targets/ARM.h
  clang/lib/Driver/ToolChains/Arch/ARM.cpp
  clang/test/CodeGen/aarch64-neon-range-checks.c
  clang/test/CodeGen/aarch64-neon-sha3.c
  clang/test/CodeGen/aarch64-neon-sm4-sm3.c
  clang/test/CodeGen/arm-target-features.c
  clang/test/CodeGen/arm64_crypto.c
  clang/test/CodeGen/neon-crypto.c
  clang/test/Driver/aarch64-cpus.c
  clang/test/Driver/arm-cortex-cpus.c
  clang/test/Driver/arm-features.c
  clang/test/Driver/arm-mfpu.c
  clang/test/Driver/armv8.1m.main.c
  clang/test/Preprocessor/aarch64-target-features.c
  clang/test/Preprocessor/arm-target-features.c
  llvm/include/llvm/Support/ARMTargetParser.def
  llvm/lib/Support/ARMTargetParser.cpp
  llvm/lib/Target/ARM/ARMInstrNEON.td
  llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  llvm/test/Bindings/llvm-c/ARM/disassemble.test
  llvm/test/MC/ARM/directive-arch_extension-aes-sha2.s
  llvm/test/MC/ARM/directive-arch_extension-crypto.s
  llvm/test/MC/ARM/neon-crypto.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99079.332287.patch
Type: text/x-patch
Size: 70892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210322/eed18c43/attachment-0001.bin>


More information about the llvm-commits mailing list