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 /llvm/lib/Target | |
| 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 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/Mips/Mips.td | 4 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MipsSubtarget.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MipsSubtarget.h | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/Mips/Mips.td b/llvm/lib/Target/Mips/Mips.td index 8d90007ed72..a4dd716360f 100644 --- a/llvm/lib/Target/Mips/Mips.td +++ b/llvm/lib/Target/Mips/Mips.td @@ -57,8 +57,8 @@ def MipsInstrInfo : InstrInfo; // Mips Subtarget features // //===----------------------------------------------------------------------===// -def FeatureABICalls : SubtargetFeature<"abicalls", "IsABICalls", "true", - "SVR4-style position-independent code.">; +def FeatureNoABICalls : SubtargetFeature<"noabicalls", "NoABICalls", "true", + "Disable SVR4-style position-independent code.">; def FeatureGP64Bit : SubtargetFeature<"gp64", "IsGP64bit", "true", "General Purpose Registers are 64-bit wide.">; def FeatureFP64Bit : SubtargetFeature<"fp64", "IsFP64bit", "true", diff --git a/llvm/lib/Target/Mips/MipsSubtarget.cpp b/llvm/lib/Target/Mips/MipsSubtarget.cpp index 2377f5c5d2b..a690dea7e4b 100644 --- a/llvm/lib/Target/Mips/MipsSubtarget.cpp +++ b/llvm/lib/Target/Mips/MipsSubtarget.cpp @@ -107,7 +107,7 @@ MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU, MipsTargetMachine *_TM) : MipsGenSubtargetInfo(TT, CPU, FS), MipsArchVersion(Mips32), MipsABI(UnknownABI), IsLittle(little), IsSingleFloat(false), - IsFPXX(false), IsABICalls(true), IsFP64bit(false), UseOddSPReg(true), + IsFPXX(false), NoABICalls(false), IsFP64bit(false), UseOddSPReg(true), IsNaN2008bit(false), IsGP64bit(false), HasVFPU(false), HasCnMips(false), IsLinux(true), HasMips3_32(false), HasMips3_32r2(false), HasMips4_32(false), HasMips4_32r2(false), HasMips5_32r2(false), diff --git a/llvm/lib/Target/Mips/MipsSubtarget.h b/llvm/lib/Target/Mips/MipsSubtarget.h index 8415212a975..1961b273e3f 100644 --- a/llvm/lib/Target/Mips/MipsSubtarget.h +++ b/llvm/lib/Target/Mips/MipsSubtarget.h @@ -65,8 +65,8 @@ protected: // IsFPXX - MIPS O32 modeless ABI. bool IsFPXX; - // IsABICalls - SVR4-style position-independent code. - bool IsABICalls; + // NoABICalls - Disable SVR4-style position-independent code. + bool NoABICalls; // IsFP64bit - The target processor has 64-bit floating point registers. bool IsFP64bit; @@ -203,7 +203,7 @@ public: bool hasCnMips() const { return HasCnMips; } bool isLittle() const { return IsLittle; } - bool isABICalls() const { return IsABICalls; } + bool isABICalls() const { return !NoABICalls; } bool isFPXX() const { return IsFPXX; } bool isFP64bit() const { return IsFP64bit; } bool useOddSPReg() const { return UseOddSPReg; } |

