summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-06-26 01:51:13 +0000
committerDale Johannesen <dalej@apple.com>2008-06-26 01:51:13 +0000
commita2de8eab618f57b70e2374f56f2b1141a9cfa1de (patch)
tree8214ac401a5c56b7524b24b572ef7b9556459319 /llvm/lib/Target
parent3f1c75c4d816f04e96aeb82f13d2acee86d21880 (diff)
downloadbcm5719-llvm-a2de8eab618f57b70e2374f56f2b1141a9cfa1de.tar.gz
bcm5719-llvm-a2de8eab618f57b70e2374f56f2b1141a9cfa1de.zip
Fixes the last x86-64 test failure in compat.exp:
<16 x float> is 64-byte aligned (for some reason), which gets us into the stack realignment code. The computation changing FP-relative offsets to SP-relative was broken, assiging a spill temp to a location also used for parameter passing. This fixes it by rounding up the stack frame to a multiple of the largest alignment (I concluded it wasn't fixable without doing this, but I'm not very sure.) llvm-svn: 52750
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/X86RegisterInfo.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp
index 0bac85094ca..b48cee3ac33 100644
--- a/llvm/lib/Target/X86/X86RegisterInfo.cpp
+++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp
@@ -302,11 +302,9 @@ X86RegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const {
// Skip the saved EBP
Offset += SlotSize;
else {
- unsigned MaxAlign = MF.getFrameInfo()->getMaxAlignment();
- uint64_t FrameSize =
- (StackSize - SlotSize + MaxAlign - 1)/MaxAlign*MaxAlign;
-
- return Offset + FrameSize - SlotSize;
+ unsigned Align = MF.getFrameInfo()->getObjectAlignment(FI);
+ assert( (-(Offset + StackSize)) % Align == 0);
+ return Offset + StackSize;
}
// FIXME: Support tail calls
OpenPOWER on IntegriCloud