summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsMachineFunction.h
diff options
context:
space:
mode:
authorSasa Stankovic <Sasa.Stankovic@imgtec.com>2014-07-14 09:40:29 +0000
committerSasa Stankovic <Sasa.Stankovic@imgtec.com>2014-07-14 09:40:29 +0000
commitb976fee83c474bb8a295cf141ed0cfe3717a8fee (patch)
tree81386ed2b92d7b340b36da568a5fabc1661a7622 /llvm/lib/Target/Mips/MipsMachineFunction.h
parent465466e80ca6aedef9c30e65fe61ff3a0cf3b7e0 (diff)
downloadbcm5719-llvm-b976fee83c474bb8a295cf141ed0cfe3717a8fee.tar.gz
bcm5719-llvm-b976fee83c474bb8a295cf141ed0cfe3717a8fee.zip
[mips] Expand BuildPairF64 to a spill and reload when the O32 FPXX ABI is
enabled and mthc1 and dmtc1 are not available (e.g. on MIPS32r1) This prevents the upper 32-bits of a double precision value from being moved to the FPU with mtc1 to an odd-numbered FPU register. This is necessary to ensure that the code generated executes correctly regardless of the current FPU mode. MIPS32r2 and above continues to use mtc1/mthc1, while MIPS-IV and above continue to use dmtc1. Differential Revision: http://reviews.llvm.org/D4465 llvm-svn: 212930
Diffstat (limited to 'llvm/lib/Target/Mips/MipsMachineFunction.h')
-rw-r--r--llvm/lib/Target/Mips/MipsMachineFunction.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/MipsMachineFunction.h b/llvm/lib/Target/Mips/MipsMachineFunction.h
index 8c16f82bfb6..a667d43724c 100644
--- a/llvm/lib/Target/Mips/MipsMachineFunction.h
+++ b/llvm/lib/Target/Mips/MipsMachineFunction.h
@@ -54,7 +54,8 @@ class MipsFunctionInfo : public MachineFunctionInfo {
public:
MipsFunctionInfo(MachineFunction &MF)
: MF(MF), SRetReturnReg(0), GlobalBaseReg(0), Mips16SPAliasReg(0),
- VarArgsFrameIndex(0), CallsEhReturn(false), SaveS2(false) {}
+ VarArgsFrameIndex(0), CallsEhReturn(false), SaveS2(false),
+ BuildPairF64_FI(-1) {}
~MipsFunctionInfo();
@@ -96,6 +97,8 @@ public:
void setSaveS2() { SaveS2 = true; }
bool hasSaveS2() const { return SaveS2; }
+ int getBuildPairF64_FI(const TargetRegisterClass *RC);
+
std::map<const char *, const llvm::Mips16HardFloatInfo::FuncSignature *>
StubsNeeded;
@@ -136,6 +139,10 @@ private:
// saveS2
bool SaveS2;
+ /// FrameIndex for expanding BuildPairF64 nodes to spill and reload when the
+ /// O32 FPXX ABI is enabled. -1 is used to denote invalid index.
+ int BuildPairF64_FI;
+
/// MipsCallEntry maps.
StringMap<const MipsCallEntry *> ExternalCallEntries;
ValueMap<const GlobalValue *, const MipsCallEntry *> GlobalCallEntries;
OpenPOWER on IntegriCloud