summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsEmitGPRestore.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanak@gmail.com>2011-07-07 18:57:00 +0000
committerAkira Hatanaka <ahatanak@gmail.com>2011-07-07 18:57:00 +0000
commit2e766ed2f8f701f114e0de43bf3f38143e6acabe (patch)
treea125b8f8e580af03e7ec08f19813fb1ef922c2b7 /llvm/lib/Target/Mips/MipsEmitGPRestore.cpp
parent6f472e803bf88243f5962ce57418ace971c31565 (diff)
downloadbcm5719-llvm-2e766ed2f8f701f114e0de43bf3f38143e6acabe.tar.gz
bcm5719-llvm-2e766ed2f8f701f114e0de43bf3f38143e6acabe.zip
Reverse order of operands of address operand mem so that the base operand comes
before the offset. This change will enable simplification of function MipsRegisterInfo::eliminateFrameIndex. llvm-svn: 134625
Diffstat (limited to 'llvm/lib/Target/Mips/MipsEmitGPRestore.cpp')
-rw-r--r--llvm/lib/Target/Mips/MipsEmitGPRestore.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/Mips/MipsEmitGPRestore.cpp b/llvm/lib/Target/Mips/MipsEmitGPRestore.cpp
index f49d490565f..03d922fe7cd 100644
--- a/llvm/lib/Target/Mips/MipsEmitGPRestore.cpp
+++ b/llvm/lib/Target/Mips/MipsEmitGPRestore.cpp
@@ -64,8 +64,8 @@ bool Inserter::runOnMachineFunction(MachineFunction &F) {
// Insert lw.
++I;
DebugLoc dl = I != MBB.end() ? I->getDebugLoc() : DebugLoc();
- BuildMI(MBB, I, dl, TII->get(Mips::LW), Mips::GP).addImm(0)
- .addFrameIndex(FI);
+ BuildMI(MBB, I, dl, TII->get(Mips::LW), Mips::GP).addFrameIndex(FI)
+ .addImm(0);
Changed = true;
}
@@ -77,8 +77,8 @@ bool Inserter::runOnMachineFunction(MachineFunction &F) {
DebugLoc dl = I->getDebugLoc();
// emit lw $gp, ($gp save slot on stack) after jalr
- BuildMI(MBB, ++I, dl, TII->get(Mips::LW), Mips::GP).addImm(0)
- .addFrameIndex(FI);
+ BuildMI(MBB, ++I, dl, TII->get(Mips::LW), Mips::GP).addFrameIndex(FI)
+ .addImm(0);
Changed = true;
}
}
OpenPOWER on IntegriCloud