mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
[mips] For the FP64A ABI, odd-numbered double-precision moves must not use mtc1/mfc1.
Summary: This is because the FP64A the hardware will redirect 32-bit reads/writes from/to odd-numbered registers to the upper 32-bits of the corresponding even register. In effect, simulating FR=0 mode when FR=0 mode is not available. Unfortunately, we have to make the decision to avoid mfc1/mtc1 before register allocation so we currently do this for even registers too. FPXX has a similar requirement on 32-bit architectures that lack mfhc1/mthc1 so this patch also handles the affected moves from the FPU for FPXX too. Moves to the FPU were supported by an earlier commit. Differential Revision: http://reviews.llvm.org/D4484 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212938 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -55,7 +55,7 @@ public:
|
||||
MipsFunctionInfo(MachineFunction &MF)
|
||||
: MF(MF), SRetReturnReg(0), GlobalBaseReg(0), Mips16SPAliasReg(0),
|
||||
VarArgsFrameIndex(0), CallsEhReturn(false), SaveS2(false),
|
||||
BuildPairF64_FI(-1) {}
|
||||
MoveF64ViaSpillFI(-1) {}
|
||||
|
||||
~MipsFunctionInfo();
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
void setSaveS2() { SaveS2 = true; }
|
||||
bool hasSaveS2() const { return SaveS2; }
|
||||
|
||||
int getBuildPairF64_FI(const TargetRegisterClass *RC);
|
||||
int getMoveF64ViaSpillFI(const TargetRegisterClass *RC);
|
||||
|
||||
std::map<const char *, const llvm::Mips16HardFloatInfo::FuncSignature *>
|
||||
StubsNeeded;
|
||||
@@ -141,7 +141,7 @@ private:
|
||||
|
||||
/// 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;
|
||||
int MoveF64ViaSpillFI;
|
||||
|
||||
/// MipsCallEntry maps.
|
||||
StringMap<const MipsCallEntry *> ExternalCallEntries;
|
||||
|
Reference in New Issue
Block a user