diff options
author | Sjoerd Meijer <sjoerd.meijer@arm.com> | 2018-06-29 08:43:19 +0000 |
---|---|---|
committer | Sjoerd Meijer <sjoerd.meijer@arm.com> | 2018-06-29 08:43:19 +0000 |
commit | 195e9040022e6516fbd26b46b712c15465edecbc (patch) | |
tree | 1256695fb1f2038e418ab68cec809aff803bc6ea /llvm/lib/Target/ARM/ARMSubtarget.h | |
parent | 2f3eff86b1710174b009420d12bf7774847312d5 (diff) | |
download | bcm5719-llvm-195e9040022e6516fbd26b46b712c15465edecbc.tar.gz bcm5719-llvm-195e9040022e6516fbd26b46b712c15465edecbc.zip |
[ARM][AArch64] Armv8.4-A Enablement
Initial patch adding assembly support for Armv8.4-A.
Besides adding v8.4 as a supported architecture to the usual places, this also
adds target features for the different crypto algorithms. Armv8.4-A introduced
new crypto algorithms, made them optional, and allows different combinations:
- none of the v8.4 crypto functions are supported, which is independent of the
implementation of the Armv8.0 SHA1 and SHA2 instructions.
- the v8.4 SHA512 and SHA3 support is implemented, in this case the Armv8.0
SHA1 and SHA2 instructions must also be implemented.
- the v8.4 SM3 and SM4 support is implemented, which is independent of the
implementation of the Armv8.0 SHA1 and SHA2 instructions.
- all of the v8.4 crypto functions are supported, in this case the Armv8.0 SHA1
and SHA2 instructions must also be implemented.
The v8.4 crypto instructions are added to AArch64 only, and not AArch32,
and are made optional extensions to Armv8.2-A.
The user-facing Clang options will map on these new target features, their
naming will be compatible with GCC and added in follow-up patches.
The Armv8.4-A instruction sets can be downloaded here:
https://developer.arm.com/products/architecture/a-profile/exploration-tools
Differential Revision: https://reviews.llvm.org/D48625
llvm-svn: 335953
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.h')
-rw-r--r-- | llvm/lib/Target/ARM/ARMSubtarget.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h index f72b97fc0d7..d665f9355ee 100644 --- a/llvm/lib/Target/ARM/ARMSubtarget.h +++ b/llvm/lib/Target/ARM/ARMSubtarget.h @@ -105,6 +105,7 @@ protected: ARMv81a, ARMv82a, ARMv83a, + ARMv84a, ARMv8a, ARMv8mBaseline, ARMv8mMainline, @@ -151,6 +152,7 @@ protected: bool HasV8_1aOps = false; bool HasV8_2aOps = false; bool HasV8_3aOps = false; + bool HasV8_4aOps = false; bool HasV8MBaselineOps = false; bool HasV8MMainlineOps = false; @@ -299,6 +301,12 @@ protected: /// Has8MSecExt - if true, processor supports ARMv8-M Security Extensions bool Has8MSecExt = false; + /// HasSHA2 - if true, processor supports SHA1 and SHA256 + bool HasSHA2 = false; + + /// HasAES - if true, processor supports AES + bool HasAES = false; + /// HasCrypto - if true, processor supports Cryptography extensions bool HasCrypto = false; @@ -513,6 +521,7 @@ public: bool hasV8_1aOps() const { return HasV8_1aOps; } bool hasV8_2aOps() const { return HasV8_2aOps; } bool hasV8_3aOps() const { return HasV8_3aOps; } + bool hasV8_4aOps() const { return HasV8_4aOps; } bool hasV8MBaselineOps() const { return HasV8MBaselineOps; } bool hasV8MMainlineOps() const { return HasV8MMainlineOps; } @@ -538,6 +547,8 @@ public: bool hasVFP4() const { return HasVFPv4; } bool hasFPARMv8() const { return HasFPARMv8; } bool hasNEON() const { return HasNEON; } + bool hasSHA2() const { return HasSHA2; } + bool hasAES() const { return HasAES; } bool hasCrypto() const { return HasCrypto; } bool hasDotProd() const { return HasDotProd; } bool hasCRC() const { return HasCRC; } |