diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2014-08-08 15:47:17 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2014-08-08 15:47:17 +0000 |
commit | feb613028bfc7edb371546cd493708fd156b45a3 (patch) | |
tree | eb72a30064ea3c3d125685c0009436eaa1aac68d /clang/test | |
parent | ced70066c24b9f62ad0e4d4c303a6122d7d335f2 (diff) | |
download | bcm5719-llvm-feb613028bfc7edb371546cd493708fd156b45a3.tar.gz bcm5719-llvm-feb613028bfc7edb371546cd493708fd156b45a3.zip |
[mips] Invert the abicalls feature bit to be noabicalls so that it's possible for -mno-abicalls to take effect.
Also added the testcase that should have been in r215194.
This behaviour has surprised me a few times now. The problem is that the
generated MipsSubtarget::ParseSubtargetFeatures() contains code like this:
if ((Bits & Mips::FeatureABICalls) != 0) IsABICalls = true;
so '-abicalls' means 'leave it at the default' and '+abicalls' means 'set it to
true'. In this case, (and the similar -modd-spreg case) I'd like the code to be
IsABICalls = (Bits & Mips::FeatureABICalls) != 0;
or possibly:
if ((Bits & Mips::FeatureABICalls) != 0)
IsABICalls = true;
else
IsABICalls = false;
and preferably arrange for 'Bits & Mips::FeatureABICalls' to be true by default
(on some triples).
llvm-svn: 215211
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Driver/mips-features.c | 6 | ||||
-rw-r--r-- | clang/test/Driver/mips-integrated-as.s | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/clang/test/Driver/mips-features.c b/clang/test/Driver/mips-features.c index 964e88bfb8b..f7022306fc1 100644 --- a/clang/test/Driver/mips-features.c +++ b/clang/test/Driver/mips-features.c @@ -1,16 +1,14 @@ // Check handling MIPS specific features options. // // -mabicalls -// RUN: %clang -target mips-linux-gnu -### -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-MABICALLS %s // RUN: %clang -target mips-linux-gnu -### -c %s -mno-abicalls -mabicalls 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MABICALLS %s -// CHECK-MABICALLS: "-target-feature" "+abicalls" +// CHECK-MABICALLS: "-target-feature" "-noabicalls" // // -mno-abicalls // RUN: %clang -target mips-linux-gnu -### -c %s -mabicalls -mno-abicalls 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MNOABICALLS %s -// CHECK-MNOABICALLS: "-target-feature" "-abicalls" +// CHECK-MNOABICALLS: "-target-feature" "+noabicalls" // // -mips16 // RUN: %clang -target mips-linux-gnu -### -c %s \ diff --git a/clang/test/Driver/mips-integrated-as.s b/clang/test/Driver/mips-integrated-as.s index 398ea458dcb..b648650e4be 100644 --- a/clang/test/Driver/mips-integrated-as.s +++ b/clang/test/Driver/mips-integrated-as.s @@ -206,14 +206,12 @@ // FPXX-ODDSPREG: "-target-feature" "+fpxx" // FPXX-ODDSPREG: "-target-feature" "-nooddspreg" -// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ -// RUN: FileCheck -check-prefix=ABICALLS-ON %s // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabicalls 2>&1 | \ // RUN: FileCheck -check-prefix=ABICALLS-ON %s // ABICALLS-ON: -cc1as -// ABICALLS-ON: "-target-feature" "+abicalls" +// ABICALLS-ON: "-target-feature" "-noabicalls" // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-abicalls 2>&1 | \ // RUN: FileCheck -check-prefix=ABICALLS-OFF %s // ABICALLS-OFF: -cc1as -// ABICALLS-OFF: "-target-feature" "-abicalls" +// ABICALLS-OFF: "-target-feature" "+noabicalls" |