mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Fix a dumb bug of mine where we were mishandling the PPC ABI (undef handling).
This fixes voronoi and bh in Olden, allowing all of olden to pass! llvm-svn: 23133
This commit is contained in:
parent
05f6bb1b68
commit
238fbfcf67
@ -1479,27 +1479,28 @@ SDOperand PPC32DAGToDAGISel::Select(SDOperand Op) {
|
||||
PPC::F8, PPC::F9, PPC::F10, PPC::F11, PPC::F12, PPC::F13
|
||||
};
|
||||
|
||||
for (unsigned i = 2, e = N->getNumOperands(); i != e; ++i)
|
||||
for (unsigned i = 2, e = N->getNumOperands(); i != e; ++i) {
|
||||
unsigned DestReg = 0;
|
||||
MVT::ValueType RegTy;
|
||||
if (N->getOperand(i).getValueType() == MVT::i32) {
|
||||
assert(GPR_idx < 8 && "Too many int args");
|
||||
DestReg = GPR[GPR_idx++];
|
||||
RegTy = MVT::i32;
|
||||
} else {
|
||||
assert(MVT::isFloatingPoint(N->getOperand(i).getValueType()) &&
|
||||
"Unpromoted integer arg?");
|
||||
assert(FPR_idx < 13 && "Too many fp args");
|
||||
DestReg = FPR[FPR_idx++];
|
||||
RegTy = MVT::f64; // Even if this is really f32!
|
||||
}
|
||||
|
||||
if (N->getOperand(i).getOpcode() != ISD::UNDEF) {
|
||||
unsigned DestReg = 0;
|
||||
MVT::ValueType RegTy;
|
||||
if (N->getOperand(i).getValueType() == MVT::i32) {
|
||||
assert(GPR_idx < 8 && "Too many int args");
|
||||
DestReg = GPR[GPR_idx++];
|
||||
RegTy = MVT::i32;
|
||||
} else {
|
||||
assert(MVT::isFloatingPoint(N->getOperand(i).getValueType()) &&
|
||||
"Unpromoted integer arg?");
|
||||
assert(FPR_idx < 13 && "Too many fp args");
|
||||
DestReg = FPR[FPR_idx++];
|
||||
RegTy = MVT::f64; // Even if this is really f32!
|
||||
}
|
||||
|
||||
SDOperand Reg = CurDAG->getRegister(DestReg, RegTy);
|
||||
Chain = CurDAG->getNode(ISD::CopyToReg, MVT::Other, Chain, Reg,
|
||||
Select(N->getOperand(i)));
|
||||
CallOperands.push_back(Reg);
|
||||
}
|
||||
}
|
||||
|
||||
// Finally, once everything is in registers to pass to the call, emit the
|
||||
// call itself.
|
||||
|
Loading…
Reference in New Issue
Block a user