]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
builtin-apply2.c (STACK_ARGUMENTS_SIZE): Define to 20 if __ARM_PCS is defined otherwi...
authorJie Zhang <jie@codesourcery.com>
Wed, 18 Aug 2010 14:45:33 +0000 (14:45 +0000)
committerJie Zhang <jiez@gcc.gnu.org>
Wed, 18 Aug 2010 14:45:33 +0000 (14:45 +0000)
* 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

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtin-apply2.c

index 2e2912e79e89f72505bac7fa516869c43c6ea46f..e4c980e406268314e346da4b7c21ee8efd77e7c5 100644 (file)
@@ -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
index a303e3ddb79b9c6e8f0f6743fe455a9682052f51..047a1e854497dc34e516555d8ead4cbd890aed37 100644 (file)
@@ -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)