[llvm-commits] CVS: llvm/lib/Target/ARM/ARMRegisterInfo.cpp
Rafael Espindola
rafael.espindola at gmail.com
Wed Aug 9 06:16:06 PDT 2006
Changes in directory llvm/lib/Target/ARM:
ARMRegisterInfo.cpp updated: 1.11 -> 1.12
---
Log message:
fix the loading of the link register in emitepilogue
---
Diffs of the changes: (+3 -1)
ARMRegisterInfo.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp
diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.11 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.12
--- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.11 Tue Aug 8 15:35:03 2006
+++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Wed Aug 9 08:15:47 2006
@@ -129,6 +129,8 @@
// entry to the current function. This eliminates the need for add/sub
// brackets around call sites.
NumBytes += MFI->getMaxCallFrameSize();
+ } else {
+ NumBytes += 4;
}
MFI->setStackSize(NumBytes);
@@ -149,7 +151,7 @@
int NumBytes = (int) MFI->getStackSize();
//ldr lr, [sp]
- BuildMI(MBB, MBBI, ARM::ldr, 2, ARM::R14).addImm(0).addReg(ARM::R13);
+ BuildMI(MBB, MBBI, ARM::ldr, 2, ARM::R14).addImm(NumBytes - 4).addReg(ARM::R13);
//add sp, sp, #NumBytes
BuildMI(MBB, MBBI, ARM::addri, 2, ARM::R13).addReg(ARM::R13).addImm(NumBytes);
}
More information about the llvm-commits
mailing list