mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Fix fallout from getOffsetOfLocalArea() being negated. Debugging dumps were being
printed incorrectly, and we were reserving 8 extra bytes of stack space for functions on X86. llvm-svn: 14152
This commit is contained in:
parent
8dd2380de4
commit
84269aa91e
@ -201,7 +201,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;
|
||||
int Off = SO.SPOffset - ValOffset;
|
||||
OS << " at location [SP";
|
||||
if (Off > 0)
|
||||
OS << "+" << Off;
|
||||
|
@ -206,7 +206,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
|
||||
// of stack growth -- so it's always positive.
|
||||
int Offset = TFI.getOffsetOfLocalArea();
|
||||
if (StackGrowsDown)
|
||||
Offset = -Offset;
|
||||
Offset = -Offset;
|
||||
assert(Offset >= 0
|
||||
&& "Local area offset should be in direction of stack growth");
|
||||
|
||||
@ -256,7 +256,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
|
||||
Offset = (Offset+StackAlignment-1)/StackAlignment*StackAlignment;
|
||||
|
||||
// Set the final value of the stack pointer...
|
||||
FFI->setStackSize(Offset-TFI.getOffsetOfLocalArea());
|
||||
FFI->setStackSize(Offset+TFI.getOffsetOfLocalArea());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user