aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/Mips/Mips16FrameLowering.cpp
diff options
context:
space:
mode:
authorReed Kotler <rkotler@mips.com>2013-08-04 23:56:53 +0000
committerReed Kotler <rkotler@mips.com>2013-08-04 23:56:53 +0000
commit9c285b300d6c055efbec5e727f1ed47c8369c72f (patch)
tree563a57a8343b842cb9f501b79428614d873221e5 /llvm/lib/Target/Mips/Mips16FrameLowering.cpp
parentb9549baf7fa0edb118f049850c073177500121eb (diff)
downloadllvm-9c285b300d6c055efbec5e727f1ed47c8369c72f.zip
llvm-9c285b300d6c055efbec5e727f1ed47c8369c72f.tar.gz
llvm-9c285b300d6c055efbec5e727f1ed47c8369c72f.tar.bz2
Add the saving of S2. This is needed for some of the floating point
helper functions. This can be optimized out later when the remaining parts of the helper function work is moved into the Mips16HardFloat pass. For now it forces us to use the 32 bit save/restore instructions instead of the 16 bit ones. llvm-svn: 187712
Diffstat (limited to 'llvm/lib/Target/Mips/Mips16FrameLowering.cpp')
-rw-r--r--llvm/lib/Target/Mips/Mips16FrameLowering.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/Mips16FrameLowering.cpp b/llvm/lib/Target/Mips/Mips16FrameLowering.cpp
index 9fde614..6655ff9 100644
--- a/llvm/lib/Target/Mips/Mips16FrameLowering.cpp
+++ b/llvm/lib/Target/Mips/Mips16FrameLowering.cpp
@@ -56,11 +56,14 @@ void Mips16FrameLowering::emitPrologue(MachineFunction &MF) const {
MCSymbol *CSLabel = MMI.getContext().CreateTempSymbol();
BuildMI(MBB, MBBI, dl,
TII.get(TargetOpcode::PROLOG_LABEL)).addSym(CSLabel);
+ unsigned S2 = MRI->getDwarfRegNum(Mips::S2, true);
+ MMI.addFrameInst(MCCFIInstruction::createOffset(CSLabel, S2, -8));
+
unsigned S1 = MRI->getDwarfRegNum(Mips::S1, true);
- MMI.addFrameInst(MCCFIInstruction::createOffset(CSLabel, S1, -8));
+ MMI.addFrameInst(MCCFIInstruction::createOffset(CSLabel, S1, -12));
unsigned S0 = MRI->getDwarfRegNum(Mips::S0, true);
- MMI.addFrameInst(MCCFIInstruction::createOffset(CSLabel, S0, -12));
+ MMI.addFrameInst(MCCFIInstruction::createOffset(CSLabel, S0, -16));
unsigned RA = MRI->getDwarfRegNum(Mips::RA, true);
MMI.addFrameInst(MCCFIInstruction::createOffset(CSLabel, RA, -4));
@@ -168,6 +171,7 @@ processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
MF.getRegInfo().setPhysRegUsed(Mips::RA);
MF.getRegInfo().setPhysRegUsed(Mips::S0);
MF.getRegInfo().setPhysRegUsed(Mips::S1);
+ MF.getRegInfo().setPhysRegUsed(Mips::S2);
}
const MipsFrameLowering *