forked from OSchip/llvm-project
Handle storing args to the stack for calls.
llvm-svn: 117055
This commit is contained in:
parent
a7f6150c14
commit
b353e4f579
|
@ -1358,7 +1358,6 @@ bool ARMFastISel::ProcessCallArgs(SmallVectorImpl<Value*> &Args,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now copy/store arg to correct locations.
|
// Now copy/store arg to correct locations.
|
||||||
// TODO: We need custom lowering for f64 args.
|
|
||||||
if (VA.isRegLoc() && !VA.needsCustom()) {
|
if (VA.isRegLoc() && !VA.needsCustom()) {
|
||||||
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(TargetOpcode::COPY),
|
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(TargetOpcode::COPY),
|
||||||
VA.getLocReg())
|
VA.getLocReg())
|
||||||
|
@ -1380,11 +1379,14 @@ bool ARMFastISel::ProcessCallArgs(SmallVectorImpl<Value*> &Args,
|
||||||
RegArgs.push_back(VA.getLocReg());
|
RegArgs.push_back(VA.getLocReg());
|
||||||
RegArgs.push_back(NextVA.getLocReg());
|
RegArgs.push_back(NextVA.getLocReg());
|
||||||
} else {
|
} else {
|
||||||
// Need to store
|
assert(VA.isMemLoc());
|
||||||
return false;
|
// Need to store on the stack.
|
||||||
|
unsigned Base = ARM::SP;
|
||||||
|
int Offset = VA.getLocMemOffset();
|
||||||
|
|
||||||
|
if (!ARMEmitStore(ArgVT, Arg, Base, Offset)) return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue