mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-23 02:32:11 +00:00
Get rid of idefs for arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21250 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9c24ba642e
commit
e1c5a00e8b
@ -170,20 +170,25 @@ AlphaTargetLowering::LowerArguments(Function &F, SelectionDAG &DAG)
|
|||||||
for (int i = 0; i < 6; ++i)
|
for (int i = 0; i < 6; ++i)
|
||||||
{
|
{
|
||||||
if (F.isVarArg()) {
|
if (F.isVarArg()) {
|
||||||
BuildMI(&BB, Alpha::IDEF, 0, args_int[i]);
|
F->addLiveIn(args_int[i]);
|
||||||
BuildMI(&BB, Alpha::IDEF, 0, args_float[i]);
|
F->addLiveIn(args_float[i]);
|
||||||
|
// BuildMI(&BB, Alpha::IDEF, 0, args_int[i]);
|
||||||
|
// BuildMI(&BB, Alpha::IDEF, 0, args_float[i]);
|
||||||
} else if (I != E)
|
} else if (I != E)
|
||||||
{
|
{
|
||||||
if(MVT::isInteger(getValueType(I->getType())))
|
if(MVT::isInteger(getValueType(I->getType())))
|
||||||
BuildMI(&BB, Alpha::IDEF, 0, args_int[i]);
|
F->addLiveIn(args_int[i]);
|
||||||
|
// BuildMI(&BB, Alpha::IDEF, 0, args_int[i]);
|
||||||
else
|
else
|
||||||
BuildMI(&BB, Alpha::IDEF, 0, args_float[i]);
|
F->addLiveIn(args_float[i]);
|
||||||
|
// BuildMI(&BB, Alpha::IDEF, 0, args_float[i]);
|
||||||
++I;
|
++I;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildMI(&BB, Alpha::IDEF, 0, Alpha::R29);
|
F->addLiveIn(Alpha::R29);
|
||||||
|
// BuildMI(&BB, Alpha::IDEF, 0, Alpha::R29);
|
||||||
BuildMI(&BB, Alpha::BIS, 2, GP).addReg(Alpha::R29).addReg(Alpha::R29);
|
BuildMI(&BB, Alpha::BIS, 2, GP).addReg(Alpha::R29).addReg(Alpha::R29);
|
||||||
|
|
||||||
for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(); I != E; ++I)
|
for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(); I != E; ++I)
|
||||||
@ -257,6 +262,24 @@ AlphaTargetLowering::LowerArguments(Function &F, SelectionDAG &DAG)
|
|||||||
|
|
||||||
//Set up a token factor with all the stack traffic
|
//Set up a token factor with all the stack traffic
|
||||||
DAG.setRoot(DAG.getNode(ISD::TokenFactor, MVT::Other, LS));
|
DAG.setRoot(DAG.getNode(ISD::TokenFactor, MVT::Other, LS));
|
||||||
|
|
||||||
|
// Finally, inform the code generator which regs we return values in.
|
||||||
|
switch (getValueType(F.getReturnType())) {
|
||||||
|
default: assert(0 && "Unknown type!");
|
||||||
|
case MVT::isVoid: break;
|
||||||
|
case MVT::i1:
|
||||||
|
case MVT::i8:
|
||||||
|
case MVT::i16:
|
||||||
|
case MVT::i32:
|
||||||
|
case MVT::i64:
|
||||||
|
MF.addLiveOut(Alpha::R0);
|
||||||
|
break;
|
||||||
|
case MVT::f32:
|
||||||
|
case MVT::f64:
|
||||||
|
MF.addLiveOut(Alpha::F0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
//return the arguments
|
//return the arguments
|
||||||
return ArgValues;
|
return ArgValues;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user