2 Purpose: Check if long long are passed in the corresponding regs on ppc.
5 Originator: <andreast@gcc.gnu.org> 20050222 */
9 static long long return_ll(int ll0, long long ll1, int ll2)
11 return ll0 + ll1 + ll2;
17 ffi_type *args[MAX_ARGS];
18 void *values[MAX_ARGS];
23 args[0] = &ffi_type_sint;
24 args[1] = &ffi_type_sint64;
25 args[2] = &ffi_type_sint;
30 /* Initialize the cif */
31 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 3,
32 &ffi_type_sint64, args) == FFI_OK);
35 ll1 = 11111111111000LL;
38 ffi_call(&cif, FFI_FN(return_ll), &rlonglong, values);
39 printf("res: %lld, %lld\n", rlonglong, ll0 + ll1 + ll2);
40 /* { dg-output "res: 11111133333222, 11111133333222" } */