mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Make Complex long long/double/long double work
in ppc64 mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48459 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b7f0c082cb
commit
257f75d0b8
@ -23,7 +23,7 @@ class CCIfSubtarget<string F, CCAction A>
|
|||||||
// Return-value convention for PowerPC
|
// Return-value convention for PowerPC
|
||||||
def RetCC_PPC : CallingConv<[
|
def RetCC_PPC : CallingConv<[
|
||||||
CCIfType<[i32], CCAssignToReg<[R3, R4, R5, R6, R7, R8, R9, R10]>>,
|
CCIfType<[i32], CCAssignToReg<[R3, R4, R5, R6, R7, R8, R9, R10]>>,
|
||||||
CCIfType<[i64], CCAssignToReg<[X3, X4]>>,
|
CCIfType<[i64], CCAssignToReg<[X3, X4, X5, X6]>>,
|
||||||
|
|
||||||
CCIfType<[f32], CCAssignToReg<[F1]>>,
|
CCIfType<[f32], CCAssignToReg<[F1]>>,
|
||||||
CCIfType<[f64], CCAssignToReg<[F1, F2]>>,
|
CCIfType<[f64], CCAssignToReg<[F1, F2]>>,
|
||||||
|
@ -2259,7 +2259,24 @@ SDOperand PPCTargetLowering::LowerCALL(SDOperand Op, SelectionDAG &DAG,
|
|||||||
NodeTys.push_back(MVT::i32);
|
NodeTys.push_back(MVT::i32);
|
||||||
break;
|
break;
|
||||||
case MVT::i64:
|
case MVT::i64:
|
||||||
if (Op.Val->getValueType(1) == MVT::i64) {
|
if (Op.Val->getNumValues()>=4 &&
|
||||||
|
Op.Val->getValueType(3) == MVT::i64) {
|
||||||
|
Chain = DAG.getCopyFromReg(Chain, PPC::X3, MVT::i64, InFlag).getValue(1);
|
||||||
|
ResultVals[0] = Chain.getValue(0);
|
||||||
|
Chain = DAG.getCopyFromReg(Chain, PPC::X4, MVT::i64,
|
||||||
|
Chain.getValue(2)).getValue(1);
|
||||||
|
ResultVals[1] = Chain.getValue(0);
|
||||||
|
Chain = DAG.getCopyFromReg(Chain, PPC::X5, MVT::i64,
|
||||||
|
Chain.getValue(2)).getValue(1);
|
||||||
|
ResultVals[2] = Chain.getValue(0);
|
||||||
|
Chain = DAG.getCopyFromReg(Chain, PPC::X6, MVT::i64,
|
||||||
|
Chain.getValue(2)).getValue(1);
|
||||||
|
ResultVals[3] = Chain.getValue(0);
|
||||||
|
NumResults = 4;
|
||||||
|
NodeTys.push_back(MVT::i64);
|
||||||
|
NodeTys.push_back(MVT::i64);
|
||||||
|
NodeTys.push_back(MVT::i64);
|
||||||
|
} else if (Op.Val->getValueType(1) == MVT::i64) {
|
||||||
Chain = DAG.getCopyFromReg(Chain, PPC::X3, MVT::i64, InFlag).getValue(1);
|
Chain = DAG.getCopyFromReg(Chain, PPC::X3, MVT::i64, InFlag).getValue(1);
|
||||||
ResultVals[0] = Chain.getValue(0);
|
ResultVals[0] = Chain.getValue(0);
|
||||||
Chain = DAG.getCopyFromReg(Chain, PPC::X4, MVT::i64,
|
Chain = DAG.getCopyFromReg(Chain, PPC::X4, MVT::i64,
|
||||||
|
Loading…
Reference in New Issue
Block a user