[PATCH] D142410: [AArch64] ARMv8.5-A implies both FEAT_SB and FEAT_SSBS

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 02:46:20 PST 2023


lenary added a comment.

SSBS is not mandatory from v8.5a onwards. More details/citation inline.

NB: This will need a rebase, because @dmgreen changed how crypto is handled in these bitmaps yesterday.



================
Comment at: llvm/include/llvm/TargetParser/AArch64TargetParser.h:311
 inline constexpr ArchInfo ARMV8_4A  = { VersionTuple{8, 4}, AProfile, "armv8.4-a", "+v8.4a", (ARMV8_3A.DefaultExts | AArch64::AEK_DOTPROD)};
-inline constexpr ArchInfo ARMV8_5A  = { VersionTuple{8, 5}, AProfile, "armv8.5-a", "+v8.5a", (ARMV8_4A.DefaultExts)};
+inline constexpr ArchInfo ARMV8_5A  = { VersionTuple{8, 5}, AProfile, "armv8.5-a", "+v8.5a", (ARMV8_4A.DefaultExts | AArch64::AEK_SB | AArch64::AEK_SSBS )};
 constexpr unsigned BaseNoCrypto = ARMV8_5A.DefaultExts ^ AArch64::AEK_CRYPTO; // 8.6 onwards has no AEK_CRYPTO
----------------
According to the A-profile Arm ARM (version I.a):
- FEAT_SB is mandatory from v8.5 onwards, so thank you for correcting this oversight.
- There is no language about the same for FEAT_SSBS/FEAT_SSBS2. It was added to v8.0a by v8.5a, but it doesn't seem to have been made mandatory in v8.5a, as far as I can see. There is no language in section A2 (Architectural Extensions), or in the description of the `ID_AA64PFR1_EL1.SSBS` register about being mandatory from certain versions (other fields in this register do have this language).


================
Comment at: llvm/include/llvm/TargetParser/AArch64TargetParser.h:323
 // For v8-R, we do not enable crypto and align with GCC that enables a more minimal set of optional architecture extensions.
 inline constexpr ArchInfo ARMV8R    = { VersionTuple{8, 0}, RProfile, "armv8-r", "+v8r", ((BaseNoCrypto ^ AArch64::AEK_LSE) | AArch64::AEK_SSBS | AArch64::AEK_FP16 | AArch64::AEK_FP16FML | AArch64::AEK_SB), };
 // clang-format on
----------------
This bitmap is based on the v8.5a bitmap, so would need checking, but it looks like it will be correct already because v8r has SB and SSBS marked already (which is correct).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142410/new/

https://reviews.llvm.org/D142410



More information about the llvm-commits mailing list