mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
If the alignment of the byval argument is greater than the alignment
of the frame then increase the maximum alignment of the frame to match. Fixes PR6965 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132764 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -49,6 +49,8 @@ void CCState::HandleByVal(unsigned ValNo, MVT ValVT,
|
||||
Size = MinSize;
|
||||
if (MinAlign > (int)Align)
|
||||
Align = MinAlign;
|
||||
if (MF.getFrameInfo()->getMaxAlignment() < Align)
|
||||
MF.getFrameInfo()->setMaxAlignment(Align);
|
||||
TM.getTargetLowering()->HandleByVal(const_cast<CCState*>(this), Size);
|
||||
unsigned Offset = AllocateStack(Size, Align);
|
||||
addLoc(CCValAssign::getMem(ValNo, ValVT, Offset, LocVT, LocInfo));
|
||||
|
Reference in New Issue
Block a user