summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/mips-abi.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Driver/mips-abi.c')
-rw-r--r--clang/test/Driver/mips-abi.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/clang/test/Driver/mips-abi.c b/clang/test/Driver/mips-abi.c
index 1e7467cb478..8e3f7c0cd12 100644
--- a/clang/test/Driver/mips-abi.c
+++ b/clang/test/Driver/mips-abi.c
@@ -1,9 +1,18 @@
// Check passing Mips ABI options to the backend.
//
// RUN: %clang -target mips-linux-gnu -### -c %s 2>&1 \
-// RUN: | FileCheck -check-prefix=MIPS-DEF %s
-// MIPS-DEF: "-target-cpu" "mips32r2"
-// MIPS-DEF: "-target-abi" "o32"
+// RUN: | FileCheck -check-prefix=MIPS32R2-O32 %s
+// RUN: %clang -target mips64-linux-gnu -mips32r2 -mabi=32 -### -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS32R2-O32 %s
+// MIPS32R2-O32: "-target-cpu" "mips32r2"
+// MIPS32R2-O32: "-target-abi" "o32"
+//
+// FIXME: This is a valid combination of options but we reject it at the moment
+// because the backend can't handle it.
+// RUN: not %clang -target mips-linux-gnu -c %s \
+// RUN: -march=mips64r2 -mabi=32 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS64R2-O32 %s
+// MIPS64R2-O32: error: ABI 'o32' is not supported on CPU 'mips64r2'
//
// RUN: %clang -target mips64-linux-gnu -### -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS64R2-N64 %s
@@ -11,6 +20,8 @@
// RUN: | FileCheck -check-prefix=MIPS64R2-N64 %s
// RUN: %clang -target mips-mti-linux-gnu -mips64r2 -### -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS64R2-N64 %s
+// RUN: %clang -target mips-linux-gnu -mips64r2 -mabi=64 -### -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS64R2-N64 %s
// MIPS64R2-N64: "-target-cpu" "mips64r2"
// MIPS64R2-N64: "-target-abi" "n64"
//
@@ -114,7 +125,7 @@
// RUN: not %clang -target mips-linux-gnu -c %s \
// RUN: -march=p5600 -mabi=64 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ARCH-P5600-N64 %s
-// MIPS-ARCH-P5600-N64: error: unknown target ABI 'n64'
+// MIPS-ARCH-P5600-N64: error: ABI 'n64' is not supported on CPU 'p5600'
//
// RUN: %clang -target mips-linux-gnu -### -c %s \
// RUN: -march=mips64 2>&1 \
@@ -143,7 +154,7 @@
// RUN: not %clang -target mips64-linux-gnu -c %s \
// RUN: -march=mips32 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ARCH-6432 %s
-// MIPS-ARCH-6432: error: unknown target CPU 'mips32'
+// MIPS-ARCH-6432: error: ABI 'n64' is not supported on CPU 'mips32'
//
// RUN: not %clang -target mips-linux-gnu -c %s \
// RUN: -march=unknown 2>&1 \
OpenPOWER on IntegriCloud