diff options
author | Jie Zhang <jie@codesourcery.com> | 2010-08-18 14:45:33 +0000 |
---|---|---|
committer | Jie Zhang <jiez@gcc.gnu.org> | 2010-08-18 14:45:33 +0000 |
commit | 1027c9c5b9c0d3d60fe1eb711bd97c8432c6cfb6 (patch) | |
tree | a69a0aadb5b9e54f6f31e9195429a7796bd80e26 /gcc | |
parent | 480161b52bd6c4080e5bc8a94a2288761b5bae04 (diff) | |
download | gcc-1027c9c5b9c0d3d60fe1eb711bd97c8432c6cfb6.zip gcc-1027c9c5b9c0d3d60fe1eb711bd97c8432c6cfb6.tar.gz gcc-1027c9c5b9c0d3d60fe1eb711bd97c8432c6cfb6.tar.bz2 |
builtin-apply2.c (STACK_ARGUMENTS_SIZE): Define to 20 if __ARM_PCS is defined otherwise 64.
* gcc.dg/builtin-apply2.c (STACK_ARGUMENTS_SIZE): Define to
20 if __ARM_PCS is defined otherwise 64.
(bar): Use STACK_ARGUMENTS_SIZE for the third argument
instead of hard coded 64.
From-SVN: r163341
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/builtin-apply2.c | 13 |
2 files changed, 18 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2e2912e..e4c980e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2010-08-18 Jie Zhang <jie@codesourcery.com> + + * gcc.dg/builtin-apply2.c (STACK_ARGUMENTS_SIZE): Define to + 20 if __ARM_PCS is defined otherwise 64. + (bar): Use STACK_ARGUMENTS_SIZE for the third argument + instead of hard coded 64. + 2010-08-18 Yao Qi <yao@codesourcery.com> PR target/45094 diff --git a/gcc/testsuite/gcc.dg/builtin-apply2.c b/gcc/testsuite/gcc.dg/builtin-apply2.c index a303e3d..047a1e8 100644 --- a/gcc/testsuite/gcc.dg/builtin-apply2.c +++ b/gcc/testsuite/gcc.dg/builtin-apply2.c @@ -8,10 +8,19 @@ /* Verify that __builtin_apply behaves correctly on targets with pre-pushed arguments (e.g. SPARC). */ - + #define INTEGER_ARG 5 +#ifdef __ARM_PCS +/* For Base AAPCS, NAME is passed in r0. D is passed in r2 and r3. + E, F and G are passed on stack. So the size of the stack argument + data is 20. */ +#define STACK_ARGUMENTS_SIZE 20 +#else +#define STACK_ARGUMENTS_SIZE 64 +#endif + extern void abort(void); void foo(char *name, double d, double e, double f, int g) @@ -22,7 +31,7 @@ void foo(char *name, double d, double e, double f, int g) void bar(char *name, ...) { - __builtin_apply(foo, __builtin_apply_args(), 64); + __builtin_apply(foo, __builtin_apply_args(), STACK_ARGUMENTS_SIZE); } int main(void) |