mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-06 10:38:54 +00:00
this should take care of calls to varadic functions, but it doesn.,t
BUG: calling printf(string, float) will load the float into the wrong register, completely forget about loading the string, etce git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24947 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0b3c4d8221
commit
98b3a83d83
@ -388,16 +388,22 @@ IA64TargetLowering::LowerCallTo(SDOperand Chain,
|
||||
InFlag = Chain.getValue(1);
|
||||
|
||||
//FIXME: for performance, only do the following when required
|
||||
|
||||
|
||||
// if we have just copied an FP arg, copy its in-memory representation
|
||||
// to the appropriate integer register
|
||||
/* if(MVT::isFloatingPoint(RegValuesToPass[i].getValueType())) {
|
||||
Chain = DAG.getTargetNode(IA64::GETFD, MVT::i64, RegValuesToPass[i], Chain, InFlag);
|
||||
InFlag = Chain.getValue(0); // XXX
|
||||
Chain = DAG.getCopyToReg(Chain, IntArgRegs[i], Chain, InFlag); // ...thrice!
|
||||
if(MVT::isFloatingPoint(RegValuesToPass[i].getValueType())) {
|
||||
std::vector<MVT::ValueType> GETFDRetTypes;
|
||||
std::vector<SDOperand> GETFDOperands;
|
||||
GETFDRetTypes.push_back(MVT::i64);
|
||||
GETFDRetTypes.push_back(MVT::Flag);
|
||||
GETFDOperands.push_back(RegValuesToPass[i]);
|
||||
GETFDOperands.push_back(Chain);
|
||||
GETFDOperands.push_back(InFlag);
|
||||
|
||||
Chain = DAG.getNode(IA64ISD::GETFD, GETFDRetTypes, GETFDOperands);
|
||||
Chain = DAG.getCopyToReg(Chain, IntArgRegs[i], Chain.getValue(0), Chain.getValue(1)); // ...thrice!
|
||||
InFlag = Chain.getValue(1);
|
||||
} */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<MVT::ValueType> RetVals;
|
||||
@ -452,6 +458,7 @@ IA64TargetLowering::LowerCallTo(SDOperand Chain,
|
||||
RetVal = DAG.getNode(RetTy->isSigned() ? ISD::AssertSext :ISD::AssertZext,
|
||||
MVT::i64, RetVal, DAG.getValueType(RetTyVT));
|
||||
RetVal = DAG.getNode(ISD::TRUNCATE, RetTyVT, RetVal);
|
||||
break;
|
||||
case MVT::i64:
|
||||
RetVal = DAG.getCopyFromReg(Chain, IA64::r8, MVT::i64, InFlag);
|
||||
Chain = RetVal.getValue(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user