mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Revert "X86: Align the stack on word boundaries in LowerFormalArguments()"
This (mostly) reverts commit r216119. Somewhere during the review Reid committed r214980 which fixed this another way, and I neglected to check that the testcase still failed before committing. I've left test/CodeGen/X86/aligned-variadic.ll around in case it adds extra coverage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216246 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a79efd7469
commit
5e83e81ab2
@ -371,16 +371,11 @@ public:
|
|||||||
return Reg;
|
return Reg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// AlignStack - Align the top of the stakc to the specified alignment.
|
|
||||||
void AlignStack(unsigned Align) {
|
|
||||||
assert(Align && ((Align - 1) & Align) == 0); // Align is power of 2.
|
|
||||||
StackOffset = ((StackOffset + Align - 1) & ~(Align - 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// AllocateStack - Allocate a chunk of stack space with the specified size
|
/// AllocateStack - Allocate a chunk of stack space with the specified size
|
||||||
/// and alignment.
|
/// and alignment.
|
||||||
unsigned AllocateStack(unsigned Size, unsigned Align) {
|
unsigned AllocateStack(unsigned Size, unsigned Align) {
|
||||||
AlignStack(Align);
|
assert(Align && ((Align - 1) & Align) == 0); // Align is power of 2.
|
||||||
|
StackOffset = ((StackOffset + Align - 1) & ~(Align - 1));
|
||||||
unsigned Result = StackOffset;
|
unsigned Result = StackOffset;
|
||||||
StackOffset += Size;
|
StackOffset += Size;
|
||||||
MF.getFrameInfo()->ensureMaxAlignment(Align);
|
MF.getFrameInfo()->ensureMaxAlignment(Align);
|
||||||
|
@ -2298,7 +2298,6 @@ X86TargetLowering::LowerFormalArguments(SDValue Chain,
|
|||||||
CCInfo.AllocateStack(32, 8);
|
CCInfo.AllocateStack(32, 8);
|
||||||
|
|
||||||
CCInfo.AnalyzeFormalArguments(Ins, CC_X86);
|
CCInfo.AnalyzeFormalArguments(Ins, CC_X86);
|
||||||
CCInfo.AlignStack(Is64Bit ? 8 : 4);
|
|
||||||
|
|
||||||
unsigned LastVal = ~0U;
|
unsigned LastVal = ~0U;
|
||||||
SDValue ArgValue;
|
SDValue ArgValue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user