Patchwork [PING,testsuite] Update gcc.dg/stack-usage-1.c SIZE values for powerpc

login
register
mail settings
Submitter Peter Bergner
Date March 29, 2011, 12:14 p.m.
Message ID <1301400881.3679.24.camel@otta>
Download mbox | patch
Permalink /patch/88751/
State New
Headers show

Comments

Peter Bergner - March 29, 2011, 12:14 p.m.
On Tue, 2011-03-29 at 07:39 +0200, Dominique Dhumieres wrote:
> > Ok, slightly updated.  How about this? ...
> 
> It did not work either at -m64, but the following one seems to work
> (manual testing):
> 
> --- /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/stack-usage-1.c	2011-03-28 20:27:57.000000000 +0200
> +++ /opt/gcc/work/gcc/testsuite/gcc.dg/stack-usage-1.c	2011-03-29 07:35:59.000000000 +0200
> @@ -30,12 +30,17 @@
>  #  else
>  #    define SIZE 248
>  #  endif
> -#elif defined (__powerpc64__) || defined (__PPC64__)
> +#elif defined (__powerpc64__) || defined (__ppc64__) || defined (__POWERPC64__) \
> +      || defined (__PPC64__)
>  #  define SIZE 180

Ahh, I thought the SIZE was off and it was just that darwin doesn't
define the same macros.  Well it's good to see both 64-bit
Linux and darwin share the same stack usage, which makes sense.
Thanks.

Mike and David, I assume the updated patch below is ok for mainline?

Peter

	* gcc.dg/stack-usage-1.c (SIZE): Provide proper values for __ppc64__
	and __APPLE__ && __PPC__ && __ALTIVEC__.

Patch

--- /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/stack-usage-1.c    2011-03-28 20:27:57.000000000 +0200
+++ /opt/gcc/work/gcc/testsuite/gcc.dg/stack-usage-1.c  2011-03-29 07:35:59.000000000 +0200
@@ -30,12 +30,17 @@ 
 #  else
 #    define SIZE 248
 #  endif
-#elif defined (__powerpc64__) || defined (__PPC64__)
+#elif defined (__powerpc64__) || defined (__ppc64__) || defined (__POWERPC64__) \
+      || defined (__PPC64__)
 #  define SIZE 180
 #elif defined (__powerpc__) || defined (__PPC__) || defined (__ppc__) \
       || defined (__POWERPC__) || defined (PPC) || defined (_IBMR2)
 #  if defined (__ALTIVEC__)
-#    define SIZE 220
+#    if defined (__APPLE__)
+#      define SIZE 204
+#    else
+#      define SIZE 220
+#    endif
 #  else
 #    define SIZE 240
 #  endif