mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-20 09:30:43 +00:00
Make sure that the call stack adjustments have default operands. Also
leave custom lowerings for later. Fixes some nightly tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116232 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0a434dbb91
commit
fb0b892f7e
@ -1229,8 +1229,9 @@ bool ARMFastISel::ProcessCallArgs(SmallVectorImpl<Value*> &Args,
|
|||||||
|
|
||||||
// Issue CALLSEQ_START
|
// Issue CALLSEQ_START
|
||||||
unsigned AdjStackDown = TM.getRegisterInfo()->getCallFrameSetupOpcode();
|
unsigned AdjStackDown = TM.getRegisterInfo()->getCallFrameSetupOpcode();
|
||||||
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(AdjStackDown))
|
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
||||||
.addImm(NumBytes);
|
TII.get(AdjStackDown))
|
||||||
|
.addImm(NumBytes));
|
||||||
|
|
||||||
// Process the args.
|
// Process the args.
|
||||||
for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) {
|
for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) {
|
||||||
@ -1247,7 +1248,8 @@ bool ARMFastISel::ProcessCallArgs(SmallVectorImpl<Value*> &Args,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now copy/store arg to correct locations.
|
// Now copy/store arg to correct locations.
|
||||||
if (VA.isRegLoc()) {
|
// TODO: We need custom lowering for f64 args.
|
||||||
|
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())
|
||||||
.addReg(Arg);
|
.addReg(Arg);
|
||||||
@ -1266,8 +1268,9 @@ bool ARMFastISel::FinishCall(EVT RetVT, SmallVectorImpl<unsigned> &UsedRegs,
|
|||||||
unsigned &NumBytes) {
|
unsigned &NumBytes) {
|
||||||
// Issue CALLSEQ_END
|
// Issue CALLSEQ_END
|
||||||
unsigned AdjStackUp = TM.getRegisterInfo()->getCallFrameDestroyOpcode();
|
unsigned AdjStackUp = TM.getRegisterInfo()->getCallFrameDestroyOpcode();
|
||||||
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(AdjStackUp))
|
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
||||||
.addImm(NumBytes).addImm(0);
|
TII.get(AdjStackUp))
|
||||||
|
.addImm(NumBytes).addImm(0));
|
||||||
|
|
||||||
// Now the return value.
|
// Now the return value.
|
||||||
if (RetVT.getSimpleVT().SimpleTy != MVT::isVoid) {
|
if (RetVT.getSimpleVT().SimpleTy != MVT::isVoid) {
|
||||||
|
Loading…
Reference in New Issue
Block a user