2 Purpose: Check if long long are passed in the corresponding regs on ppc.
5 Originator: <andreast@gcc.gnu.org> 20050222 */
8 /* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */
10 static long long return_ll(int ll0
, long long ll1
, int ll2
)
12 return ll0
+ ll1
+ ll2
;
18 ffi_type
*args
[MAX_ARGS
];
19 void *values
[MAX_ARGS
];
24 args
[0] = &ffi_type_sint
;
25 args
[1] = &ffi_type_sint64
;
26 args
[2] = &ffi_type_sint
;
31 /* Initialize the cif */
32 CHECK(ffi_prep_cif(&cif
, FFI_DEFAULT_ABI
, 3,
33 &ffi_type_sint64
, args
) == FFI_OK
);
36 ll1
= 11111111111000LL;
39 ffi_call(&cif
, FFI_FN(return_ll
), &rlonglong
, values
);
40 printf("res: %" PRIdLL
", %" PRIdLL
"\n", rlonglong
, ll0
+ ll1
+ ll2
);
41 /* { dg-output "res: 11111133333222, 11111133333222" } */