forked from OSchip/llvm-project
Add argument registers to the end of call operand list (partial fix).
llvm-svn: 28783
This commit is contained in:
parent
f0a7a1a117
commit
ca25486603
|
@ -617,6 +617,13 @@ SDOperand X86TargetLowering::LowerCCCCallTo(SDOperand Op, SelectionDAG &DAG) {
|
||||||
std::vector<SDOperand> Ops;
|
std::vector<SDOperand> Ops;
|
||||||
Ops.push_back(Chain);
|
Ops.push_back(Chain);
|
||||||
Ops.push_back(Callee);
|
Ops.push_back(Callee);
|
||||||
|
|
||||||
|
// Add argument registers to the end of the list so that they are known live
|
||||||
|
// into the call.
|
||||||
|
for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i)
|
||||||
|
Ops.push_back(DAG.getRegister(RegsToPass[i].first,
|
||||||
|
RegsToPass[i].second.getValueType()));
|
||||||
|
|
||||||
if (InFlag.Val)
|
if (InFlag.Val)
|
||||||
Ops.push_back(InFlag);
|
Ops.push_back(InFlag);
|
||||||
|
|
||||||
|
@ -1139,6 +1146,13 @@ X86TargetLowering::LowerFastCCArguments(SDOperand Op, SelectionDAG &DAG) {
|
||||||
std::vector<SDOperand> Ops;
|
std::vector<SDOperand> Ops;
|
||||||
Ops.push_back(Chain);
|
Ops.push_back(Chain);
|
||||||
Ops.push_back(Callee);
|
Ops.push_back(Callee);
|
||||||
|
|
||||||
|
// Add argument registers to the end of the list so that they are known live
|
||||||
|
// into the call.
|
||||||
|
for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i)
|
||||||
|
Ops.push_back(DAG.getRegister(RegsToPass[i].first,
|
||||||
|
RegsToPass[i].second.getValueType()));
|
||||||
|
|
||||||
if (InFlag.Val)
|
if (InFlag.Val)
|
||||||
Ops.push_back(InFlag);
|
Ops.push_back(InFlag);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue