mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-30 00:16:48 +00:00 
			
		
		
		
	Add argument registers to the end of call operand list (partial fix).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28783 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -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); | ||||||
|  |  | ||||||
| @@ -985,7 +992,7 @@ X86TargetLowering::LowerFastCCArguments(SDOperand Op, SelectionDAG &DAG) { | |||||||
|   return DAG.getNode(ISD::MERGE_VALUES, RetVTs, ArgValues); |   return DAG.getNode(ISD::MERGE_VALUES, RetVTs, ArgValues); | ||||||
| } | } | ||||||
|  |  | ||||||
|  SDOperand X86TargetLowering::LowerFastCCCallTo(SDOperand Op, SelectionDAG &DAG) { | SDOperand X86TargetLowering::LowerFastCCCallTo(SDOperand Op, SelectionDAG &DAG) { | ||||||
|   SDOperand Chain     = Op.getOperand(0); |   SDOperand Chain     = Op.getOperand(0); | ||||||
|   unsigned CallingConv= cast<ConstantSDNode>(Op.getOperand(1))->getValue(); |   unsigned CallingConv= cast<ConstantSDNode>(Op.getOperand(1))->getValue(); | ||||||
|   bool isVarArg       = cast<ConstantSDNode>(Op.getOperand(2))->getValue() != 0; |   bool isVarArg       = cast<ConstantSDNode>(Op.getOperand(2))->getValue() != 0; | ||||||
| @@ -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); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user