Hi all,

This patch adds two new command line options for the legacy cryptographic 
extensions AES (+aes) and SHA-1/SHA-2 (+sha2). Backward compatibility is 
retained by modifying the +crypto feature modifier to enable +aes and +sha2.

Bootstrapped on aarch64-none-elf. Tested with new binutils and verified all 
instructions assembly correctly.

2017-11-10  Michael Collison  <michael.colli...@arm.com>

        * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
        (__ARM_FEATURE_AES): Define if TARGET_AES is true.
        (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
        * config/aarch64/aarch64-option-extension.def: Add
        AARCH64_OPT_EXTENSION of 'sha2'.
        (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
        (crypto): Disable sha2 and aes if crypto disabled.
        (crypto): Enable aes and sha2 if enabled.
        (simd): Disable sha2 and aes if simd disabled.
        * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
        New flags.
        (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
        (TARGET_SHA2): New feature flag for sha2.
        (TARGET_AES): New feature flag for aes.
        * config/aarch64/aarch64-simd.md:
        (aarch64_crypto_aes<aes_op>v16qi): Make pattern
        conditional on TARGET_AES.
        (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
        (aarch64_crypto_sha1hsi): Make pattern conditional
        on TARGET_SHA2.
        (aarch64_crypto_sha1hv4si): Ditto.
        (aarch64_be_crypto_sha1hv4si): Ditto.
        (aarch64_crypto_sha1su1v4si): Ditto.
        (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
        (aarch64_crypto_sha1su0v4si): Ditto.
        (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
        (aarch64_crypto_sha256su0v4si): Ditto.
        (aarch64_crypto_sha256su1v4si): Ditto.
        (doc/invoke.texi): Document new aes and sha2 options.

Attachment: crypto_split.patch
Description: crypto_split.patch

Reply via email to