diff options
| author | Daniel Sanders <daniel.sanders@imgtec.com> | 2014-07-14 10:26:15 +0000 |
|---|---|---|
| committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2014-07-14 10:26:15 +0000 |
| commit | 9ee2aee85962b453801a06eac3258595f193ec4a (patch) | |
| tree | 0caab913cf55a4675ac3b1d90bca423bdc115f4b /llvm/lib | |
| parent | 3362c5fb0fcff70a52e606b7a57754aba5f9a3a9 (diff) | |
| download | bcm5719-llvm-9ee2aee85962b453801a06eac3258595f193ec4a.tar.gz bcm5719-llvm-9ee2aee85962b453801a06eac3258595f193ec4a.zip | |
[mips] Correct the AFL_FLAGS1_ODDSPREG flag in .MIPS.abiflags when no '.module oddspreg' is used
Differential Revision: http://reviews.llvm.org/D4486
llvm-svn: 212932
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.h | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index 0c06be8c7d9..765ac02df13 100644 --- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -237,7 +237,7 @@ public: ((STI.getFeatureBits() & Mips::FeatureN32) != 0) + ((STI.getFeatureBits() & Mips::FeatureN64) != 0)) == 1); - if (!isABI_O32() && !allowOddSPReg() != 0) + if (!isABI_O32() && !useOddSPReg() != 0) report_fatal_error("-mno-odd-spreg requires the O32 ABI"); } @@ -254,7 +254,7 @@ public: bool isABI_O32() const { return STI.getFeatureBits() & Mips::FeatureO32; } bool isABI_FPXX() const { return false; } // TODO: add check for FeatureXX - bool allowOddSPReg() const { + bool useOddSPReg() const { return !(STI.getFeatureBits() & Mips::FeatureNoOddSPReg); } @@ -572,7 +572,7 @@ public: assert(N == 1 && "Invalid number of operands!"); Inst.addOperand(MCOperand::CreateReg(getFGR32Reg())); // FIXME: We ought to do this for -integrated-as without -via-file-asm too. - if (!AsmParser.allowOddSPReg() && RegIdx.Index & 1) + if (!AsmParser.useOddSPReg() && RegIdx.Index & 1) AsmParser.Error(StartLoc, "-mno-odd-spreg prohibits the use of odd FPU " "registers"); } diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.h b/llvm/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.h index ab18c4413ef..6ae2a3b60f3 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.h +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.h @@ -228,6 +228,7 @@ public: setCPR1SizeFromPredicates(P); setASESetFromPredicates(P); setFpAbiFromPredicates(P); + OddSPReg = P.useOddSPReg(); } }; |

