================
@@ -1027,6 +1053,50 @@
SparcTargetLowering::LowerCall_32(TargetLowering::CallLoweringInfo &CLI,
assert(VA.isMemLoc());
+ if (VA.getLocInfo() == CCValAssign::Indirect) {
+ // Store the argument in a stack slot and pass its address.
+ unsigned ArgIndex = Outs[realArgIdx].OrigArgIndex;
+ unsigned ArgPartOffset = Outs[realArgIdx].PartOffset;
+ assert(ArgPartOffset == 0);
+
+ EVT SlotVT;
+ if (i + 1 != e && Outs[realArgIdx + 1].OrigArgIndex == ArgIndex) {
+ Type *OrigArgType = CLI.Args[ArgIndex].Ty;
+ EVT OrigArgVT = getValueType(MF.getDataLayout(), OrigArgType);
+ MVT PartVT =
+ getRegisterTypeForCallingConv(Ctx, CLI.CallConv, OrigArgVT);
+ unsigned N =
+ getNumRegistersForCallingConv(Ctx, CLI.CallConv, OrigArgVT);
+ SlotVT = EVT::getIntegerVT(Ctx, PartVT.getSizeInBits() * N);
+ } else {
+ SlotVT = Outs[realArgIdx].VT;
+ }
+
+ SDValue SpillSlot = DAG.CreateStackTemporary(SlotVT);
+ int FI = cast<FrameIndexSDNode>(SpillSlot)->getIndex();
+ MemOpChains.push_back(
+ DAG.getStore(Chain, dl, Arg, SpillSlot,
+ MachinePointerInfo::getFixedStack(MF, FI)));
+ // If the original argument was split (e.g. i128), we need
----------------
koachan wrote:
Oof, my bad, it's a typo. Fixed.
https://github.com/llvm/llvm-project/pull/162226
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits