llvm.org GIT mirror llvm / 5e83e81
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 Duncan P. N. Exon Smith 6 years ago
2 changed file(s) with 2 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
370370 return Reg;
371371 }
372372
373 /// AlignStack - Align the top of the stakc to the specified alignment.
374 void AlignStack(unsigned Align) {
375 assert(Align && ((Align - 1) & Align) == 0); // Align is power of 2.
376 StackOffset = ((StackOffset + Align - 1) & ~(Align - 1));
377 }
378
379373 /// AllocateStack - Allocate a chunk of stack space with the specified size
380374 /// and alignment.
381375 unsigned AllocateStack(unsigned Size, unsigned Align) {
382 AlignStack(Align);
376 assert(Align && ((Align - 1) & Align) == 0); // Align is power of 2.
377 StackOffset = ((StackOffset + Align - 1) & ~(Align - 1));
383378 unsigned Result = StackOffset;
384379 StackOffset += Size;
385380 MF.getFrameInfo()->ensureMaxAlignment(Align);
22972297 CCInfo.AllocateStack(32, 8);
22982298
22992299 CCInfo.AnalyzeFormalArguments(Ins, CC_X86);
2300 CCInfo.AlignStack(Is64Bit ? 8 : 4);
23012300
23022301 unsigned LastVal = ~0U;
23032302 SDValue ArgValue;