summaryrefslogtreecommitdiffstats
path: root/test/Driver/mips-features.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
committerdim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
commit554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch)
tree9abb1a658a297776086f4e0dfa6ca533de02104e /test/Driver/mips-features.c
parentbb67ca86b31f67faee50bd10c3b036d65751745a (diff)
downloadFreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip
FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/Driver/mips-features.c')
-rw-r--r--test/Driver/mips-features.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/Driver/mips-features.c b/test/Driver/mips-features.c
new file mode 100644
index 0000000..5be2683
--- /dev/null
+++ b/test/Driver/mips-features.c
@@ -0,0 +1,39 @@
+// REQUIRES: mips-registered-target
+//
+// Check handling MIPS specific features options.
+//
+// -mips16
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -mno-mips16 -mips16 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-MIPS16 %s
+// CHECK-MIPS16: "-target-feature" "+mips16"
+//
+// -mno-mips16
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -mips16 -mno-mips16 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NOMIPS16 %s
+// CHECK-NOMIPS16: "-target-feature" "-mips16"
+//
+// -mdsp
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -mno-dsp -mdsp 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-MDSP %s
+// CHECK-MDSP: "-target-feature" "+dsp"
+//
+// -mno-dsp
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -mdsp -mno-dsp 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NOMDSP %s
+// CHECK-NOMDSP: "-target-feature" "-dsp"
+//
+// -mdspr2
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -mno-dspr2 -mdspr2 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-MDSPR2 %s
+// CHECK-MDSPR2: "-target-feature" "+dspr2"
+//
+// -mno-dspr2
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -mdspr2 -mno-dspr2 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NOMDSPR2 %s
+// CHECK-NOMDSPR2: "-target-feature" "-dspr2"
OpenPOWER on IntegriCloud