mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Vector function results go into V2 according to GCC. The darwin ABI doc
doesn't say where they go :-/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27579 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f87324e44d
commit
bee9836c0f
@ -877,7 +877,16 @@ SDOperand PPCTargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
||||
return SDOperand(); // ret void is legal
|
||||
case 2: {
|
||||
MVT::ValueType ArgVT = Op.getOperand(1).getValueType();
|
||||
unsigned ArgReg = MVT::isInteger(ArgVT) ? PPC::R3 : PPC::F1;
|
||||
unsigned ArgReg;
|
||||
if (MVT::isVector(ArgVT))
|
||||
ArgReg = PPC::V2;
|
||||
else if (MVT::isInteger(ArgVT))
|
||||
ArgReg = PPC::R3;
|
||||
else {
|
||||
assert(MVT::isFloatingPoint(ArgVT));
|
||||
ArgReg = PPC::F1;
|
||||
}
|
||||
|
||||
Copy = DAG.getCopyToReg(Op.getOperand(0), ArgReg, Op.getOperand(1),
|
||||
SDOperand());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user