Patchwork [committed] Tweak gcc.dg/stack-usage-1.c for MIPS

login
register
mail settings
Submitter Richard Sandiford
Date Oct. 31, 2010, 3:04 p.m.
Message ID <8762wiiets.fsf@firetop.home>
Download mbox | patch
Permalink /patch/69717/
State New
Headers show

Comments

Richard Sandiford - Oct. 31, 2010, 3:04 p.m.
The current setting of SIZE in gcc.dg/stack-usage-1.c is correct
for GNU/Linux targets, but is too small for some embedded targets.

Tested on mips64-linux-gnu and mipsisa64-elf.  Also tested with the
combination:

    mips-sim-idt64'{-mabi=32,-mabi=eabi/-mgp32,-mabi=eabi,-mabi=o64,-mabi=n32,-mabi=64}{-mabicalls,-mno-abicalls}{-mshared,-mno-shared}{-mplt,-mno-plt}'

on mipsisa64-elf.  This has 8 nonsensical combinations (EABI + abicalls),
but all the others pass.  Applied.

Richard


gcc/testsuite/
	* gcc.dg/stack-usage-1.c (SIZE): Increase to 248 for some MIPS targets.

Patch

Index: gcc/testsuite/gcc.dg/stack-usage-1.c
===================================================================
--- gcc/testsuite/gcc.dg/stack-usage-1.c	2010-10-31 14:52:19.000000000 +0000
+++ gcc/testsuite/gcc.dg/stack-usage-1.c	2010-10-31 14:57:57.000000000 +0000
@@ -24,7 +24,12 @@ 
 #elif defined (__ia64__)
 #  define SIZE 272
 #elif defined(__mips__)
-#  define SIZE 240
+#  if defined (__mips_abicalls) \
+      || (defined _MIPS_SIM && (_MIPS_SIM ==_ABIN32 || _MIPS_SIM==_ABI64))
+#    define SIZE 240
+#  else
+#    define SIZE 248
+#  endif
 #elif defined (__powerpc__) || defined (__PPC__) || defined (__ppc__) \
       || defined (__POWERPC__) || defined (PPC) || defined (_IBMR2)
 #  define SIZE 240