mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
teach cellspu how to return i8 and i16 from calls,
patch by Kalle Raiskila! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101875 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4f1f6f6342
commit
aa2776e934
@ -1330,22 +1330,12 @@ SPUTargetLowering::LowerCall(SDValue Chain, SDValue Callee,
|
||||
InVals.push_back(Chain.getValue(0));
|
||||
}
|
||||
break;
|
||||
case MVT::i8:
|
||||
case MVT::i16:
|
||||
case MVT::i64:
|
||||
Chain = DAG.getCopyFromReg(Chain, dl, SPU::R3, MVT::i64,
|
||||
InFlag).getValue(1);
|
||||
InVals.push_back(Chain.getValue(0));
|
||||
break;
|
||||
case MVT::i128:
|
||||
Chain = DAG.getCopyFromReg(Chain, dl, SPU::R3, MVT::i128,
|
||||
InFlag).getValue(1);
|
||||
InVals.push_back(Chain.getValue(0));
|
||||
break;
|
||||
case MVT::f32:
|
||||
case MVT::f64:
|
||||
Chain = DAG.getCopyFromReg(Chain, dl, SPU::R3, Ins[0].VT,
|
||||
InFlag).getValue(1);
|
||||
InVals.push_back(Chain.getValue(0));
|
||||
break;
|
||||
case MVT::v2f64:
|
||||
case MVT::v2i64:
|
||||
case MVT::v4f32:
|
||||
|
8
test/CodeGen/CellSPU/crash.ll
Normal file
8
test/CodeGen/CellSPU/crash.ll
Normal file
@ -0,0 +1,8 @@
|
||||
; RUN: llc %s -march=cellspu -o -
|
||||
declare i8 @return_i8()
|
||||
declare i16 @return_i16()
|
||||
define void @testfunc() {
|
||||
%rv1 = call i8 @return_i8()
|
||||
%rv2 = call i16 @return_i16()
|
||||
ret void
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user