Committed, MMIX: fix */builtin-apply-2.c for an instrumented setup.

Message ID alpine.BSF.2.00.1210151838550.94107@dair.pair.com
State New
Headers show

Commit Message

Hans-Peter Nilsson Oct. 15, 2012, 10:39 p.m.
When running the test-suite for these tests on an instrumented mmix
simulator (plus gcc and newlib patches to match) that, instead of
silently allocating zeros, barfs on accesses beyond the defined stack,
these tests fail because of that check.  There are no stack parameters
to copy, so there's just an unused and undefined (well, zeroed) chunk
of memory copied.  Fixes in that setup:

FAIL: gcc.dg/builtin-apply2.c execution test
..
FAIL: gcc.dg/torture/stackalign/builtin-apply-2.c  -O0  execution test

Committed.

gcc/testsuite:

	* gcc.dg/torture/stackalign/builtin-apply-2.c,
	gcc.dg/builtin-apply2.c: Correct STACK_ARGUMENTS_SIZE for MMIX.


brgds, H-P

Patch

Index: gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c	(revision 192353)
+++ gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c	(working copy)
@@ -16,6 +16,9 @@ 
    E, F and G are passed on stack.  So the size of the stack argument
    data is 20.  */
 #define STACK_ARGUMENTS_SIZE  20
+#elif defined __MMIX__
+/* No parameters on stack for bar.  */
+#define STACK_ARGUMENTS_SIZE 0
 #else
 #define STACK_ARGUMENTS_SIZE  64
 #endif
Index: gcc/testsuite/gcc.dg/builtin-apply2.c
===================================================================
--- gcc/testsuite/gcc.dg/builtin-apply2.c	(revision 192353)
+++ gcc/testsuite/gcc.dg/builtin-apply2.c	(working copy)
@@ -17,6 +17,9 @@ 
    E, F and G are passed on stack.  So the size of the stack argument
    data is 20.  */
 #define STACK_ARGUMENTS_SIZE  20
+#elif defined __MMIX__
+/* No parameters on stack for bar.  */
+#define STACK_ARGUMENTS_SIZE 0
 #else
 #define STACK_ARGUMENTS_SIZE  64
 #endif