Hi All, This patch adds support for the SHA-512 and SHA-3 instructions added in Armv8.4-a. Support for the new instructions is in the form of new ACLE intrinsics. A new command line feature modifier, +sha3, is added to enable the support.
Test cases were added to verify that the ACLE Intrinsics generate the appropriate SHA-512/SHA-3 assembly instructions. Bootstrapped on aarch64-none-elf. Tested with new binutils and verified all instructions assembly correctly. Okay for trunk? 2017-11-10 Michael Collison <michael.colli...@arm.com> * config/aarch64/aarch64-builtins.c: (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New. * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true. * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags. (AARCH64_ISA_SHA3): New ISA flag. (TARGET_SHA3): New feature flag for sha3. * config/aarch64/iterators.md (sha512_op): New int attribute. (CRYPTO_SHA512): New int iterator. (UNSPEC_SHA512H): New unspec. (UNSPEC_SHA512H2): Ditto. (UNSPEC_SHA512SU0): Ditto. (UNSPEC_SHA512SU1): Ditto. * config/aarch64/aarch64-simd-builtins.def (aarch64_crypto_sha512hqv2di): New builtin. (aarch64_crypto_sha512h2qv2di): Ditto. (aarch64_crypto_sha512su0qv2di): Ditto. (aarch64_crypto_sha512su1qv2di): Ditto. (aarch64_eor3qv8hi): Ditto. (aarch64_rax1qv2di): Ditto. (aarch64_xarqv2di): Ditto. (aarch64_bcaxqv8hi): Ditto. * config/aarch64/aarch64-simd.md: (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern. (aarch64_crypto_sha512su0qv2di): Ditto. (aarch64_crypto_sha512su1qv2di): Ditto. (aarch64_eor3qv8hi): Ditto. (aarch64_rax1qv2di): Ditto. (aarch64_xarqv2di): Ditto. (aarch64_bcaxqv8hi): Ditto. * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic. (vsha512h2q_u64): Ditto. (vsha512su0q_u64): Ditto. (vsha512su1q_u64): Ditto. (veor3q_u16): Ditto. (vrax1q_u64): Ditto. (vxarq_u64): Ditto. (vbcaxq_u16): Ditto. * config/arm/types.md (crypto_sha512): New type attribute. (crypto_sha3): Ditto. (doc/invoke.texi): Document new sha3 option. gcc.target/aarch64/sha2.h: New shared testcase. gcc.target/aarch64/sha2_1.c: New testcase. gcc.target/aarch64/sha2_2.c: New testcase. gcc.target/aarch64/sha2_3.c: New testcase. gcc.target/aarch64/sha3.h: New shared testcase. gcc.target/aarch64/sha3_1.c: New testcase. gcc.target/aarch64/sha3_2.c: New testcase. gcc.target/aarch64/sha3_3.c: New testcase.
crypto_sha512.patch
Description: crypto_sha512.patch