]> granicus.if.org Git - clang/commitdiff
[AArch64] Add command-line option for SSBS
authorPablo Barrio <pablo.barrio@arm.com>
Mon, 3 Dec 2018 14:40:37 +0000 (14:40 +0000)
committerPablo Barrio <pablo.barrio@arm.com>
Mon, 3 Dec 2018 14:40:37 +0000 (14:40 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348142 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/aarch64-ssbs.c [new file with mode: 0644]

diff --git a/test/Driver/aarch64-ssbs.c b/test/Driver/aarch64-ssbs.c
new file mode 100644 (file)
index 0000000..86c93ae
--- /dev/null
@@ -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"