mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Mark byval parameter stack objects mutable for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45813 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1012,16 +1012,17 @@ SDOperand X86TargetLowering::LowerMemArgument(SDOperand Op, SelectionDAG &DAG,
|
|||||||
MachineFrameInfo *MFI,
|
MachineFrameInfo *MFI,
|
||||||
SDOperand Root, unsigned i) {
|
SDOperand Root, unsigned i) {
|
||||||
// Create the nodes corresponding to a load from this parameter slot.
|
// Create the nodes corresponding to a load from this parameter slot.
|
||||||
|
unsigned Flags = cast<ConstantSDNode>(Op.getOperand(3 + i))->getValue();
|
||||||
|
bool isByVal = Flags & ISD::ParamFlags::ByVal;
|
||||||
|
|
||||||
|
// FIXME: For now, all byval parameter objects are marked mutable. This
|
||||||
|
// can be changed with more analysis.
|
||||||
int FI = MFI->CreateFixedObject(MVT::getSizeInBits(VA.getValVT())/8,
|
int FI = MFI->CreateFixedObject(MVT::getSizeInBits(VA.getValVT())/8,
|
||||||
VA.getLocMemOffset());
|
VA.getLocMemOffset(), !isByVal);
|
||||||
SDOperand FIN = DAG.getFrameIndex(FI, getPointerTy());
|
SDOperand FIN = DAG.getFrameIndex(FI, getPointerTy());
|
||||||
|
if (isByVal)
|
||||||
unsigned Flags = cast<ConstantSDNode>(Op.getOperand(3 + i))->getValue();
|
|
||||||
|
|
||||||
if (Flags & ISD::ParamFlags::ByVal)
|
|
||||||
return FIN;
|
return FIN;
|
||||||
else
|
return DAG.getLoad(VA.getValVT(), Root, FIN, NULL, 0);
|
||||||
return DAG.getLoad(VA.getValVT(), Root, FIN, NULL, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SDOperand
|
SDOperand
|
||||||
|
Reference in New Issue
Block a user