summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Barrio <pablo.barrio@arm.com>2018-12-03 14:40:37 +0000
committerPablo Barrio <pablo.barrio@arm.com>2018-12-03 14:40:37 +0000
commit1a6d6f053d80dcc7d772663fc8c4b36d8f3f0ef4 (patch)
tree47642d4960adfcb00c45e9cb360eec956156ab27
parent8ae0f88b139c77068573abce0a619757952f9f52 (diff)
downloadbcm5719-llvm-1a6d6f053d80dcc7d772663fc8c4b36d8f3f0ef4.tar.gz
bcm5719-llvm-1a6d6f053d80dcc7d772663fc8c4b36d8f3f0ef4.zip
[AArch64] Add command-line option for SSBS
Summary: SSBS (Speculative Store Bypass Safe) is only mandatory from 8.5 onwards but is optional from Armv8.0-A. This patch adds testing for the ssbs command line option, added to allow enabling the feature in previous Armv8-A architectures to 8.5. Reviewers: olista01, samparker, aemerson Reviewed By: samparker Subscribers: javed.absar, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D54961 llvm-svn: 348142
-rw-r--r--clang/test/Driver/aarch64-ssbs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Driver/aarch64-ssbs.c b/clang/test/Driver/aarch64-ssbs.c
new file mode 100644
index 00000000000..86c93ae9264
--- /dev/null
+++ b/clang/test/Driver/aarch64-ssbs.c
@@ -0,0 +1,9 @@
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8a+ssbs %s 2>&1 | FileCheck %s
+// CHECK: "-target-feature" "+ssbs"
+
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8a+nossbs %s 2>&1 | FileCheck %s --check-prefix=NOSSBS
+// NOSSBS: "-target-feature" "-ssbs"
+
+// RUN: %clang -### -target aarch64-none-none-eabi %s 2>&1 | FileCheck %s --check-prefix=ABSENTSSBS
+// ABSENTSSBS-NOT: "-target-feature" "+ssbs"
+// ABSENTSSBS-NOT: "-target-feature" "-ssbs"
OpenPOWER on IntegriCloud