mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
Fix type mismatches when passing f32 values to calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23159 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e836ad6736
commit
2ea0c66ae5
@ -1520,8 +1520,13 @@ SDOperand PPC32DAGToDAGISel::Select(SDOperand Op) {
|
||||
}
|
||||
|
||||
if (N->getOperand(i).getOpcode() != ISD::UNDEF) {
|
||||
Chain = CurDAG->getCopyToReg(Chain, DestReg,
|
||||
Select(N->getOperand(i)), InFlag);
|
||||
SDOperand Val = Select(N->getOperand(i));
|
||||
if (Val.getValueType() != RegTy) {
|
||||
// Use a register-register copy to handle f32 values in f64 registers.
|
||||
assert(Val.getValueType() == MVT::f32 && RegTy == MVT::f64);
|
||||
Val = CurDAG->getTargetNode(PPC::FMR, MVT::f64, Val);
|
||||
}
|
||||
Chain = CurDAG->getCopyToReg(Chain, DestReg, Val, InFlag);
|
||||
InFlag = Chain.getValue(1);
|
||||
CallOperands.push_back(CurDAG->getRegister(DestReg, RegTy));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user