diff options
author | Nick Clifton <nickc@redhat.com> | 2017-11-08 14:30:53 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-11-08 14:30:53 +0000 |
commit | c0e7cef7156b2bc15ba43441ad14c6e83c09df8e (patch) | |
tree | 0ea0ffa8915a6746c94f88180b5748094c46f216 /gas | |
parent | dec41383fff7116c9f66cdeca3105e968047a4e6 (diff) | |
download | fsf-binutils-gdb-c0e7cef7156b2bc15ba43441ad14c6e83c09df8e.zip fsf-binutils-gdb-c0e7cef7156b2bc15ba43441ad14c6e83c09df8e.tar.gz fsf-binutils-gdb-c0e7cef7156b2bc15ba43441ad14c6e83c09df8e.tar.bz2 |
Split the AArch64 Crypto instructions for AES and SHA1+2 into their own options (+aes and +sha2).
The new options are:
+aes: Enables the AES instructions of Armv8-a,
enabled by default with +crypto.
+sha2: Enables the SHA1 and SHA2 instructions of Armv8-a,
enabled by default with +crypto.
These options have been turned on by default when +crypto
is used, as such no breakage is expected.
The reason for the split is because with the introduction of Armv8.4-a
the implementation of AES has explicitly been made independent of the
implementation of the other crypto extensions. Backporting the split does
not break any of the previous requirements and so is safe to do.
gas * config/tc-aarch64.c
(aarch64_features): Include AES and SHA2 in CRYPTO.
Add SHA2 and AES.
include * opcode/aarch64.h:
(AARCH64_FEATURE_SHA2, AARCH64_FEATURE_AES): New.
opcodes * aarch64-tbl.h (aarch64_feature_crypto): Add AES and SHA2.
(aarch64_feature_sha2, aarch64_feature_aes): New.
(SHA2, AES): New.
(AES_INSN, SHA2_INSN): New.
(pmull, pmull2, aese, aesd, aesmc, aesimc): Change to AES_INS.
(sha1h, sha1su1, sha256su0, sha1c, sha1p,
sha1m, sha1su0, sha256h, sha256h2, sha256su1):
Change to SHA2_INS.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-aarch64.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 81fa312..c00c967 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2017-11-08 Tamar Christina <tamar.christina@arm.com> + + * gas/config/tc-aarch64.c + (aarch64_features): Include AES and SHA2 in CRYPTO. + Add SHA2 and AES. + 2017-11-08 Jiong Wang <jiong.wang@arm.com> Tamar Christina <tamar.christina@arm.com> diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index 91330dd..ee3c586 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -8469,7 +8469,9 @@ struct aarch64_option_cpu_value_table static const struct aarch64_option_cpu_value_table aarch64_features[] = { {"crc", AARCH64_FEATURE (AARCH64_FEATURE_CRC, 0), AARCH64_ARCH_NONE}, - {"crypto", AARCH64_FEATURE (AARCH64_FEATURE_CRYPTO, 0), + {"crypto", AARCH64_FEATURE (AARCH64_FEATURE_CRYPTO + | AARCH64_FEATURE_AES + | AARCH64_FEATURE_SHA2, 0), AARCH64_FEATURE (AARCH64_FEATURE_SIMD, 0)}, {"fp", AARCH64_FEATURE (AARCH64_FEATURE_FP, 0), AARCH64_ARCH_NONE}, @@ -8500,6 +8502,10 @@ static const struct aarch64_option_cpu_value_table aarch64_features[] = { AARCH64_ARCH_NONE}, {"dotprod", AARCH64_FEATURE (AARCH64_FEATURE_DOTPROD, 0), AARCH64_ARCH_NONE}, + {"sha2", AARCH64_FEATURE (AARCH64_FEATURE_SHA2, 0), + AARCH64_ARCH_NONE}, + {"aes", AARCH64_FEATURE (AARCH64_FEATURE_AES, 0), + AARCH64_ARCH_NONE}, {NULL, AARCH64_ARCH_NONE, AARCH64_ARCH_NONE}, }; |