diff options
author | Akira Hatanaka <ahatanak@gmail.com> | 2011-07-07 18:57:00 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanak@gmail.com> | 2011-07-07 18:57:00 +0000 |
commit | d3ac47f80551d95c64cb41c3f94e888d7e13275b (patch) | |
tree | 000d1624de5d3b56d6bab2e0ff04e69b0503fcfd /lib/Target/Mips/MipsRegisterInfo.cpp | |
parent | e280519ba61d613f43d8edce0e9e64115ceec37f (diff) | |
download | external_llvm-d3ac47f80551d95c64cb41c3f94e888d7e13275b.zip external_llvm-d3ac47f80551d95c64cb41c3f94e888d7e13275b.tar.gz external_llvm-d3ac47f80551d95c64cb41c3f94e888d7e13275b.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134625 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsRegisterInfo.cpp')
-rw-r--r-- | lib/Target/Mips/MipsRegisterInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/Mips/MipsRegisterInfo.cpp b/lib/Target/Mips/MipsRegisterInfo.cpp index 202a1d4..06b144f 100644 --- a/lib/Target/Mips/MipsRegisterInfo.cpp +++ b/lib/Target/Mips/MipsRegisterInfo.cpp @@ -224,7 +224,7 @@ eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, return; } - Offset += MI.getOperand(i-1).getImm(); + Offset += MI.getOperand(i+1).getImm(); DEBUG(errs() << "Offset : " << Offset << "\n" << "<--------->\n"); @@ -262,7 +262,7 @@ eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj, BuildMI(MBB, ++II, MI.getDebugLoc(), TII.get(Mips::ATMACRO)); MI.getOperand(i).ChangeToRegister(NewReg, false); - MI.getOperand(i-1).ChangeToImmediate(NewImm); + MI.getOperand(i+1).ChangeToImmediate(NewImm); } unsigned MipsRegisterInfo:: |