mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-25 00:33:15 +00:00
Oops. Forgot to commit this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46002 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
66fac79b89
commit
4c46fc6bbf
@ -29,15 +29,22 @@ CCState::CCState(unsigned CC, bool isVarArg, const TargetMachine &tm,
|
||||
UsedRegs.resize(MRI.getNumRegs());
|
||||
}
|
||||
|
||||
void CCState::HandleStruct(unsigned ValNo, MVT::ValueType ValVT,
|
||||
MVT::ValueType LocVT, CCValAssign::LocInfo LocInfo,
|
||||
unsigned ArgFlags) {
|
||||
unsigned MinAlign = TM.getTargetData()->getPointerABIAlignment();
|
||||
// HandleByVal - Allocate a stack slot large enough to pass an argument by
|
||||
// value. The size and alignment information of the argument is encoded in its
|
||||
// parameter attribute.
|
||||
void CCState::HandleByVal(unsigned ValNo, MVT::ValueType ValVT,
|
||||
MVT::ValueType LocVT, CCValAssign::LocInfo LocInfo,
|
||||
int MinSize, int MinAlign,
|
||||
unsigned ArgFlags) {
|
||||
unsigned Align = 1 << ((ArgFlags & ISD::ParamFlags::ByValAlign) >>
|
||||
ISD::ParamFlags::ByValAlignOffs);
|
||||
unsigned Size = (ArgFlags & ISD::ParamFlags::ByValSize) >>
|
||||
ISD::ParamFlags::ByValSizeOffs;
|
||||
unsigned Offset = AllocateStack(Size, std::max(MinAlign, Align));
|
||||
if (MinSize > (int)Size)
|
||||
Size = MinSize;
|
||||
if (MinAlign > (int)Align)
|
||||
Align = MinAlign;
|
||||
unsigned Offset = AllocateStack(Size, Align);
|
||||
|
||||
addLoc(CCValAssign::getMem(ValNo, ValVT, Offset, LocVT, LocInfo));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user