diff options
-rw-r--r-- | include/llvm/CodeGen/MachineFrameInfo.h | 12 | ||||
-rw-r--r-- | lib/CodeGen/MachineFunction.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/PrologEpilogInserter.cpp | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h index ae2c816..76b9d9b 100644 --- a/include/llvm/CodeGen/MachineFrameInfo.h +++ b/include/llvm/CodeGen/MachineFrameInfo.h @@ -84,9 +84,9 @@ class MachineFrameInfo { // SPOffset - The offset of this object from the stack pointer on entry to // the function. This field has no meaning for a variable sized element. - int SPOffset; + int64_t SPOffset; - StackObject(uint64_t Sz, unsigned Al, int SP) + StackObject(uint64_t Sz, unsigned Al, int64_t SP) : Size(Sz), Alignment(Al), SPOffset(SP) {} }; @@ -184,7 +184,7 @@ public: /// getObjectSize - Return the size of the specified object /// - int getObjectSize(int ObjectIdx) const { + int64_t getObjectSize(int ObjectIdx) const { assert(ObjectIdx+NumFixedObjects < Objects.size() && "Invalid Object Idx!"); return Objects[ObjectIdx+NumFixedObjects].Size; } @@ -198,7 +198,7 @@ public: /// getObjectOffset - Return the assigned stack offset of the specified object /// from the incoming stack pointer. /// - int getObjectOffset(int ObjectIdx) const { + int64_t getObjectOffset(int ObjectIdx) const { assert(ObjectIdx+NumFixedObjects < Objects.size() && "Invalid Object Idx!"); return Objects[ObjectIdx+NumFixedObjects].SPOffset; } @@ -206,7 +206,7 @@ public: /// setObjectOffset - Set the stack frame offset of the specified object. The /// offset is relative to the stack pointer on entry to the function. /// - void setObjectOffset(int ObjectIdx, int SPOffset) { + void setObjectOffset(int ObjectIdx, int64_t SPOffset) { assert(ObjectIdx+NumFixedObjects < Objects.size() && "Invalid Object Idx!"); Objects[ObjectIdx+NumFixedObjects].SPOffset = SPOffset; } @@ -257,7 +257,7 @@ public: /// All fixed objects should be created before other objects are created for /// efficiency. This returns an index with a negative value. /// - int CreateFixedObject(uint64_t Size, int SPOffset) { + int CreateFixedObject(uint64_t Size, int64_t SPOffset) { assert(Size != 0 && "Cannot allocate zero size fixed stack objects!"); Objects.insert(Objects.begin(), StackObject(Size, 1, SPOffset)); return -++NumFixedObjects; diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 5ae73ca..4453be8 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -342,7 +342,7 @@ void MachineFrameInfo::print(const MachineFunction &MF, std::ostream &OS) const{ if (i < NumFixedObjects) OS << " fixed"; if (i < NumFixedObjects || SO.SPOffset != -1) { - int Off = SO.SPOffset - ValOffset; + int64_t Off = SO.SPOffset - ValOffset; OS << " at location [SP"; if (Off > 0) OS << "+" << Off; diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index b6e9095..a79ba29 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -305,7 +305,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) { // Start at the beginning of the local area. // The Offset is the distance from the stack top in the direction // of stack growth -- so it's always positive. - int Offset = TFI.getOffsetOfLocalArea(); + int64_t Offset = TFI.getOffsetOfLocalArea(); if (StackGrowsDown) Offset = -Offset; assert(Offset >= 0 @@ -317,7 +317,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) { // so we adjust 'Offset' to point to the end of last fixed sized // preallocated object. for (int i = FFI->getObjectIndexBegin(); i != 0; ++i) { - int FixedOff; + int64_t FixedOff; if (StackGrowsDown) { // The maximum distance from the stack pointer is at lower address of // the object -- which is given by offset. For down growing stack |