From: James Molloy Date: Wed, 5 Apr 2017 10:44:38 +0000 (+0000) Subject: [AArch64] Crypto requires FP. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f05816007bca26d016fbd91596e4b2bb028a3d28;p=llvm [AArch64] Crypto requires FP. So if FP is disabled, crypto should also be disabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299531 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AArch64/AArch64.td b/lib/Target/AArch64/AArch64.td index 84473fd72ad..519ca289468 100644 --- a/lib/Target/AArch64/AArch64.td +++ b/lib/Target/AArch64/AArch64.td @@ -27,7 +27,7 @@ def FeatureNEON : SubtargetFeature<"neon", "HasNEON", "true", "Enable Advanced SIMD instructions", [FeatureFPARMv8]>; def FeatureCrypto : SubtargetFeature<"crypto", "HasCrypto", "true", - "Enable cryptographic instructions">; + "Enable cryptographic instructions", [FeatureNEON]>; def FeatureCRC : SubtargetFeature<"crc", "HasCRC", "true", "Enable ARMv8 CRC-32 checksum instructions">; diff --git a/test/MC/AArch64/nofp-crypto-diagnostic.s b/test/MC/AArch64/nofp-crypto-diagnostic.s new file mode 100644 index 00000000000..36da8a83128 --- /dev/null +++ b/test/MC/AArch64/nofp-crypto-diagnostic.s @@ -0,0 +1,8 @@ +// RUN: not llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon,+crypto,-fp-armv8 < %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-ERROR < %t %s + + sha1h s0, s1 + +// CHECK-ERROR: error: instruction requires: crypto +// CHECK-ERROR-NEXT: sha1h s0, s1 +// CHECK-ERROR-NEXT: ^