diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2018-10-15 22:43:23 +0000 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2018-10-15 22:43:23 +0000 |
commit | db81c7b9c964db39bbc42749dc30316dd9f58eb8 (patch) | |
tree | c9fba593b08f8f80346179749bcebd13840e15a0 /clang/test/Driver/clang-translation.c | |
parent | 6d92ca61f918456726b67d124499cbf0595ba335 (diff) | |
download | bcm5719-llvm-db81c7b9c964db39bbc42749dc30316dd9f58eb8.tar.gz bcm5719-llvm-db81c7b9c964db39bbc42749dc30316dd9f58eb8.zip |
[mips] Fix handling of GNUABIN32 environment in a target triple
The `GNUABIN32` environment in a target triple implies using the N32
ABI. This patch adds support for this environment and switches on N32
ABI if necessary.
Patch by Patch by YunQiang Su.
Differential revision: https://reviews.llvm.org/D51464
llvm-svn: 344570
Diffstat (limited to 'clang/test/Driver/clang-translation.c')
-rw-r--r-- | clang/test/Driver/clang-translation.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/clang/test/Driver/clang-translation.c b/clang/test/Driver/clang-translation.c index 2ade15c06a9..ac7ef37ff55 100644 --- a/clang/test/Driver/clang-translation.c +++ b/clang/test/Driver/clang-translation.c @@ -330,6 +330,38 @@ // MIPS64EL: "-target-cpu" "mips64r2" // MIPS64EL: "-mfloat-abi" "hard" +// RUN: %clang -target mips64-linux-gnuabi64 -### -S %s 2>&1 | \ +// RUN: FileCheck -check-prefix=MIPS64-GNUABI64 %s +// MIPS64-GNUABI64: clang +// MIPS64-GNUABI64: "-cc1" +// MIPS64-GNUABI64: "-target-cpu" "mips64r2" +// MIPS64-GNUABI64: "-target-abi" "n64" +// MIPS64-GNUABI64: "-mfloat-abi" "hard" + +// RUN: %clang -target mips64el-linux-gnuabi64 -### -S %s 2>&1 | \ +// RUN: FileCheck -check-prefix=MIPS64EL-GNUABI64 %s +// MIPS64EL-GNUABI64: clang +// MIPS64EL-GNUABI64: "-cc1" +// MIPS64EL-GNUABI64: "-target-cpu" "mips64r2" +// MIPS64EL-GNUABI64: "-target-abi" "n64" +// MIPS64EL-GNUABI64: "-mfloat-abi" "hard" + +// RUN: %clang -target mips64-linux-gnuabin32 -### -S %s 2>&1 | \ +// RUN: FileCheck -check-prefix=MIPSN32 %s +// MIPSN32: clang +// MIPSN32: "-cc1" +// MIPSN32: "-target-cpu" "mips64r2" +// MIPSN32: "-target-abi" "n32" +// MIPSN32: "-mfloat-abi" "hard" + +// RUN: %clang -target mips64el-linux-gnuabin32 -### -S %s 2>&1 | \ +// RUN: FileCheck -check-prefix=MIPSN32EL %s +// MIPSN32EL: clang +// MIPSN32EL: "-cc1" +// MIPSN32EL: "-target-cpu" "mips64r2" +// MIPSN32EL: "-target-abi" "n32" +// MIPSN32EL: "-mfloat-abi" "hard" + // RUN: %clang -target mips64el-linux-android -### -S %s 2>&1 | \ // RUN: FileCheck -check-prefix=MIPS64EL-ANDROID %s // MIPS64EL-ANDROID: clang |