[llvm-commits] CVS: llvm/lib/Target/X86/X86RegisterInfo.cpp
Chris Lattner
sabre at nondot.org
Tue Apr 24 21:25:27 PDT 2007
Changes in directory llvm/lib/Target/X86:
X86RegisterInfo.cpp updated: 1.212 -> 1.213
---
Log message:
support >4G stack frames
---
Diffs of the changes: (+9 -9)
X86RegisterInfo.cpp | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
Index: llvm/lib/Target/X86/X86RegisterInfo.cpp
diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.212 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.213
--- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.212 Tue Apr 24 16:19:14 2007
+++ llvm/lib/Target/X86/X86RegisterInfo.cpp Tue Apr 24 23:25:10 2007
@@ -939,7 +939,7 @@
// 'sub ESP, <amt>' and the adjcallstackdown instruction into 'add ESP,
// <amt>'
MachineInstr *Old = I;
- unsigned Amount = Old->getOperand(0).getImmedValue();
+ uint64_t Amount = Old->getOperand(0).getImm();
if (Amount != 0) {
// We need to keep the stack aligned properly. To do this, we round the
// amount of space needed for the outgoing arguments up to the next
@@ -954,7 +954,7 @@
} else {
assert(Old->getOpcode() == X86::ADJCALLSTACKUP);
// factor out the amount the callee already popped.
- unsigned CalleeAmt = Old->getOperand(1).getImmedValue();
+ uint64_t CalleeAmt = Old->getOperand(1).getImm();
Amount -= CalleeAmt;
if (Amount) {
unsigned Opc = (Amount < 128) ?
@@ -972,7 +972,7 @@
// If we are performing frame pointer elimination and if the callee pops
// something off the stack pointer, add it back. We do this until we have
// more advanced stack pointer tracking ability.
- if (unsigned CalleeAmt = I->getOperand(1).getImmedValue()) {
+ if (uint64_t CalleeAmt = I->getOperand(1).getImm()) {
unsigned Opc = (CalleeAmt < 128) ?
(Is64Bit ? X86::SUB64ri8 : X86::SUB32ri8) :
(Is64Bit ? X86::SUB64ri32 : X86::SUB32ri);
@@ -1001,8 +1001,8 @@
MI.getOperand(i).ChangeToRegister(hasFP(MF) ? FramePtr : StackPtr, false);
// Now add the frame object offset to the offset from EBP.
- int Offset = MF.getFrameInfo()->getObjectOffset(FrameIndex) +
- MI.getOperand(i+3).getImmedValue()+SlotSize;
+ int64_t Offset = MF.getFrameInfo()->getObjectOffset(FrameIndex) +
+ MI.getOperand(i+3).getImm()+SlotSize;
if (!hasFP(MF))
Offset += MF.getFrameInfo()->getStackSize();
@@ -1182,8 +1182,8 @@
// pop EBP
BuildMI(MBB, MBBI, TII.get(Is64Bit ? X86::POP64r : X86::POP32r), FramePtr);
} else {
- // Get the number of bytes allocated from the FrameInfo...
- unsigned NumBytes = MFI->getStackSize();
+ // Get the number of bytes allocated from the FrameInfo.
+ uint64_t NumBytes = MFI->getStackSize();
if (NumBytes) { // adjust stack pointer back: ESP += numbytes
// If there is an ADD32ri or SUB32ri of ESP immediately before this
@@ -1194,12 +1194,12 @@
if ((Opc == X86::ADD64ri32 || Opc == X86::ADD64ri8 ||
Opc == X86::ADD32ri || Opc == X86::ADD32ri8) &&
PI->getOperand(0).getReg() == StackPtr) {
- NumBytes += PI->getOperand(2).getImmedValue();
+ NumBytes += PI->getOperand(2).getImm();
MBB.erase(PI);
} else if ((Opc == X86::SUB64ri32 || Opc == X86::SUB64ri8 ||
Opc == X86::SUB32ri || Opc == X86::SUB32ri8) &&
PI->getOperand(0).getReg() == StackPtr) {
- NumBytes -= PI->getOperand(2).getImmedValue();
+ NumBytes -= PI->getOperand(2).getImm();
MBB.erase(PI);
}
}
More information about the llvm-commits
mailing list