diff options
| author | James Molloy <james.molloy@arm.com> | 2017-04-05 10:44:38 +0000 |
|---|---|---|
| committer | James Molloy <james.molloy@arm.com> | 2017-04-05 10:44:38 +0000 |
| commit | 9d42334e02c25ec77c4f465676806121b56e0764 (patch) | |
| tree | 3c7dcbbd74cec706c9eba2c9ed2ca567ab818675 /llvm | |
| parent | 56abf209c21f63dc57ac182563cb0f0a743d74ae (diff) | |
| download | bcm5719-llvm-9d42334e02c25ec77c4f465676806121b56e0764.tar.gz bcm5719-llvm-9d42334e02c25ec77c4f465676806121b56e0764.zip | |
[AArch64] Crypto requires FP.
So if FP is disabled, crypto should also be disabled.
llvm-svn: 299531
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64.td | 2 | ||||
| -rw-r--r-- | llvm/test/MC/AArch64/nofp-crypto-diagnostic.s | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64.td b/llvm/lib/Target/AArch64/AArch64.td index 84473fd72ad..519ca289468 100644 --- a/llvm/lib/Target/AArch64/AArch64.td +++ b/llvm/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/llvm/test/MC/AArch64/nofp-crypto-diagnostic.s b/llvm/test/MC/AArch64/nofp-crypto-diagnostic.s new file mode 100644 index 00000000000..36da8a83128 --- /dev/null +++ b/llvm/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: ^ |

