2 /* { dg-skip-if "Variadic funcs have all args on stack. Normal funcs have args in registers." { "aarch64*-*-* avr-*-* nds32*-*-*" } { "*" } { "" } } */
3 /* { dg-skip-if "Variadic funcs use Base AAPCS. Normal funcs use VFP variant." { arm*-*-* && arm_hf_eabi } { "*" } { "" } } */
6 /* Origin: <pierre.nguyen-tuong@asim.lip6.fr> */
8 /* Verify that __builtin_apply behaves correctly on targets
9 with pre-pushed arguments (e.g. SPARC). */
15 #if defined(__ARM_PCS) || defined(__epiphany__)
16 /* For Base AAPCS, NAME is passed in r0. D is passed in r2 and r3.
17 E, F and G are passed on stack. So the size of the stack argument
19 #define STACK_ARGUMENTS_SIZE 20
20 #elif defined __MMIX__ || defined __arc__
21 /* No parameters on stack for bar. */
22 #define STACK_ARGUMENTS_SIZE 0
24 #define STACK_ARGUMENTS_SIZE 64
27 extern void abort(void);
29 void foo(char *name
, double d
, double e
, double f
, int g
)
35 void bar(char *name
, ...)
37 __builtin_apply(foo
, __builtin_apply_args(), STACK_ARGUMENTS_SIZE
);
42 bar("eeee", 5.444567, 8.90765, 4.567789, INTEGER_ARG
);