1; Test parameter passing and return values 2;RUN: llc --march=cellspu %s -o - | FileCheck %s 3 4; this fits into registers r3-r74 5%paramstruct = type { i32,i32,i32,i32,i32,i32,i32,i32,i32,i32,i32,i32, 6 i32,i32,i32,i32,i32,i32,i32,i32,i32,i32,i32,i32, 7 i32,i32,i32,i32,i32,i32,i32,i32,i32,i32,i32,i32, 8 i32,i32,i32,i32,i32,i32,i32,i32,i32,i32,i32,i32, 9 i32,i32,i32,i32,i32,i32,i32,i32,i32,i32,i32,i32, 10 i32,i32,i32,i32,i32,i32,i32,i32,i32,i32,i32,i32} 11define ccc i32 @test_regs( %paramstruct %prm ) 12{ 13;CHECK: lr $3, $74 14;CHECK: bi $lr 15 %1 = extractvalue %paramstruct %prm, 71 16 ret i32 %1 17} 18 19define ccc i32 @test_regs_and_stack( %paramstruct %prm, i32 %stackprm ) 20{ 21;CHECK-NOT: a $3, $74, $75 22 %1 = extractvalue %paramstruct %prm, 71 23 %2 = add i32 %1, %stackprm 24 ret i32 %2 25} 26 27define ccc %paramstruct @test_return( i32 %param, %paramstruct %prm ) 28{ 29;CHECK: lqd {{\$[0-9]+}}, 80($sp) 30;CHECK-NOT: ori {{\$[0-9]+, \$[0-9]+, 0}} 31;CHECK: lr $3, $4 32 ret %paramstruct %prm 33} 34 35