Hello!
Corei7 tuning doesn't set -maccumulate-outgoing-args option by default
and triggers various -mabi-ms related failures throughout the
testsuite [1]. Attached patch fixes failures by explicitly adding
-maccumulate-outgoing-args, as documented in the ms-abi option
documentation.
2013-12-15 Uros Bizjak <[email protected]>
* gcc.target/i386/pr43662.c (dg-options):
Add -maccumulate-outgoing-args.
* gcc.target/i386/pr43869.c (dg-options): Ditto.
* gcc.target/i386/pr57003.c (dg-options): Ditto.
* gcc.target/i386/avx-vzeroupper-16.c (dg-options):
Remove -mtune=generic and add -maccumulate-outgoing-args instead.
* gcc.target/i386/avx-vzeroupper-17.c (dg-options): Ditto.
* gcc.target/i386/avx-vzeroupper-18.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/func-1.c (dg-options):
Add -maccumulate-outgoing-args.
* gcc.target/x86_64/abi/callabi/func-2a.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/func-2b.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/func-indirect.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/func-indirect-2a.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/func-indirect-2b.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/leaf-1.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/leaf-2.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/pr38891.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/vaarg-1.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/vaarg-2.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/vaarg-3.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/vaarg-4a.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/vaarg-4b.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/vaarg-5a.c (dg-options): Ditto.
* gcc.target/x86_64/abi/callabi/vaarg-5b.c (dg-options): Ditto.
The patch was tested on x86_64-pc-linux-gnu {,-m32} and committed to mainline.
The patch will be backported to 4.8 branch.
[1] http://gcc.gnu.org/ml/gcc-testresults/2013-12/msg01417.html
Uros.
Index: gcc.target/i386/avx-vzeroupper-16.c
===================================================================
--- gcc.target/i386/avx-vzeroupper-16.c (revision 205996)
+++ gcc.target/i386/avx-vzeroupper-16.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile { target lp64 } } */
-/* { dg-options "-O2 -mavx -mabi=ms -mtune=generic -dp" } */
+/* { dg-options "-O2 -mavx -mabi=ms -maccumulate-outgoing-args -dp" } */
typedef float __m256 __attribute__ ((__vector_size__ (32), __may_alias__));
Index: gcc.target/i386/avx-vzeroupper-17.c
===================================================================
--- gcc.target/i386/avx-vzeroupper-17.c (revision 205996)
+++ gcc.target/i386/avx-vzeroupper-17.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile { target lp64 } } */
-/* { dg-options "-O2 -mavx -mabi=ms -mtune=generic -dp" } */
+/* { dg-options "-O2 -mavx -mabi=ms -maccumulate-outgoing-args -dp" } */
typedef float __m256 __attribute__ ((__vector_size__ (32), __may_alias__));
Index: gcc.target/i386/avx-vzeroupper-18.c
===================================================================
--- gcc.target/i386/avx-vzeroupper-18.c (revision 205996)
+++ gcc.target/i386/avx-vzeroupper-18.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile { target lp64 } } */
-/* { dg-options "-O0 -mavx -mabi=ms -mtune=generic -dp" } */
+/* { dg-options "-O0 -mavx -mabi=ms -maccumulate-outgoing-args -dp" } */
typedef float __m256 __attribute__ ((__vector_size__ (32), __may_alias__));
Index: gcc.target/i386/pr43662.c
===================================================================
--- gcc.target/i386/pr43662.c (revision 205996)
+++ gcc.target/i386/pr43662.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile { target lp64 } } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -maccumulate-outgoing-args" } */
void __attribute__ ((ms_abi)) foo (void)
{
Index: gcc.target/i386/pr43869.c
===================================================================
--- gcc.target/i386/pr43869.c (revision 205996)
+++ gcc.target/i386/pr43869.c (working copy)
@@ -1,4 +1,5 @@
/* { dg-do compile { target lp64 } } */
+/* { dg-options "-maccumulate-outgoing-args" } */
int __attribute__((__noinline__))
bugged(float f1, float f2, float f3, float f4,
Index: gcc.target/i386/pr57003.c
===================================================================
--- gcc.target/i386/pr57003.c (revision 205996)
+++ gcc.target/i386/pr57003.c (working copy)
@@ -1,6 +1,6 @@
/* PR rtl-optimization/57003 */
/* { dg-do run } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -maccumulate-outgoing-args" } */
#define N 2001
unsigned short *b, *c, *d;
Index: gcc.target/x86_64/abi/callabi/func-1.c
===================================================================
--- gcc.target/x86_64/abi/callabi/func-1.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/func-1.c (working copy)
@@ -2,7 +2,7 @@
*/
/* Origin: Kai Tietz <[email protected]> */
/* { dg-do run } */
-/* { dg-options "-std=gnu99 -ffast-math" } */
+/* { dg-options "-std=gnu99 -ffast-math -maccumulate-outgoing-args" } */
#include "callabi.h"
extern void abort (void);
Index: gcc.target/x86_64/abi/callabi/func-2a.c
===================================================================
--- gcc.target/x86_64/abi/callabi/func-2a.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/func-2a.c (working copy)
@@ -1,6 +1,6 @@
/* Test for cross x86_64<->w64 abi standard calls. */
/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
-/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin
-maccumulate-outgoing-args" } */
/* { dg-additional-sources "func-2b.c" } */
extern void __attribute__ ((sysv_abi)) abort (void);
Index: gcc.target/x86_64/abi/callabi/func-2b.c
===================================================================
--- gcc.target/x86_64/abi/callabi/func-2b.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/func-2b.c (working copy)
@@ -1,5 +1,5 @@
/* Test for cross x86_64<->w64 abi standard calls. */
-/* { dg-options "-mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
+/* { dg-options "-mabi=ms -std=gnu99 -ffast-math -fno-builtin
-maccumulate-outgoing-args" } */
long double func_cross (long double a, double b, float c, long d, int e,
char f)
Index: gcc.target/x86_64/abi/callabi/func-indirect-2a.c
===================================================================
--- gcc.target/x86_64/abi/callabi/func-indirect-2a.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/func-indirect-2a.c (working copy)
@@ -1,6 +1,6 @@
/* Test for cross x86_64<->w64 abi standard calls via variable. */
/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
-/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin
-maccumulate-outgoing-args" } */
/* { dg-additional-sources "func-indirect-2b.c" } */
extern void __attribute__ ((sysv_abi)) abort (void);
Index: gcc.target/x86_64/abi/callabi/func-indirect-2b.c
===================================================================
--- gcc.target/x86_64/abi/callabi/func-indirect-2b.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/func-indirect-2b.c (working copy)
@@ -1,5 +1,5 @@
/* Test for cross x86_64<->w64 abi standard calls via variable. */
-/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin
-maccumulate-outgoing-args" } */
typedef int (*func)(void *, char *, char *, short, long long);
Index: gcc.target/x86_64/abi/callabi/func-indirect.c
===================================================================
--- gcc.target/x86_64/abi/callabi/func-indirect.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/func-indirect.c (working copy)
@@ -2,7 +2,7 @@
*/
/* Origin: Kai Tietz <[email protected]> */
/* { dg-do run } */
-/* { dg-options "-std=gnu99 -ffast-math" } */
+/* { dg-options "-std=gnu99 -ffast-math -maccumulate-outgoing-args" } */
#include "callabi.h"
extern void abort (void);
Index: gcc.target/x86_64/abi/callabi/leaf-1.c
===================================================================
--- gcc.target/x86_64/abi/callabi/leaf-1.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/leaf-1.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mabi=sysv" } */
+/* { dg-options "-O2 -mabi=sysv -maccumulate-outgoing-args" } */
__attribute__ ((ms_abi))
int foo (void)
Index: gcc.target/x86_64/abi/callabi/leaf-2.c
===================================================================
--- gcc.target/x86_64/abi/callabi/leaf-2.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/leaf-2.c (working copy)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mabi=sysv" } */
+/* { dg-options "-O2 -mabi=sysv -maccumulate-outgoing-args" } */
extern int glb1, gbl2, gbl3;
Index: gcc.target/x86_64/abi/callabi/pr38891.c
===================================================================
--- gcc.target/x86_64/abi/callabi/pr38891.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/pr38891.c (working copy)
@@ -1,7 +1,7 @@
/* Test for cross x86_64<->w64 abi standard calls.
*/
/* { dg-do compile } */
-/* { dg-options "-mno-sse" } */
+/* { dg-options "-mno-sse -maccumulate-outgoing-args" } */
#include "callabi.h"
long double
Index: gcc.target/x86_64/abi/callabi/vaarg-1.c
===================================================================
--- gcc.target/x86_64/abi/callabi/vaarg-1.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/vaarg-1.c (working copy)
@@ -2,7 +2,7 @@
*/
/* Origin: Kai Tietz <[email protected]> */
/* { dg-do run } */
-/* { dg-options "-std=gnu99" } */
+/* { dg-options "-std=gnu99 -maccumulate-outgoing-args" } */
#include "callabi.h"
extern __SIZE_TYPE__ strlen (const char *);
Index: gcc.target/x86_64/abi/callabi/vaarg-2.c
===================================================================
--- gcc.target/x86_64/abi/callabi/vaarg-2.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/vaarg-2.c (working copy)
@@ -2,7 +2,7 @@
*/
/* Origin: Kai Tietz <[email protected]> */
/* { dg-do run } */
-/* { dg-options "-std=gnu99" } */
+/* { dg-options "-std=gnu99 -maccumulate-outgoing-args" } */
#include "callabi.h"
extern void abort (void);
Index: gcc.target/x86_64/abi/callabi/vaarg-3.c
===================================================================
--- gcc.target/x86_64/abi/callabi/vaarg-3.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/vaarg-3.c (working copy)
@@ -2,7 +2,7 @@
*/
/* Origin: Kai Tietz <[email protected]> */
/* { dg-do run } */
-/* { dg-options "-std=gnu99" } */
+/* { dg-options "-std=gnu99 -maccumulate-outgoing-args" } */
#include "callabi.h"
extern void abort (void);
Index: gcc.target/x86_64/abi/callabi/vaarg-4a.c
===================================================================
--- gcc.target/x86_64/abi/callabi/vaarg-4a.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/vaarg-4a.c (working copy)
@@ -1,6 +1,6 @@
/* Test for cross x86_64<->w64 abi va_list calls. */
/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
-/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin
-maccumulate-outgoing-args" } */
/* { dg-additional-sources "vaarg-4b.c" } */
extern __SIZE_TYPE__ __attribute__ ((sysv_abi)) strlen (const char *);
Index: gcc.target/x86_64/abi/callabi/vaarg-4b.c
===================================================================
--- gcc.target/x86_64/abi/callabi/vaarg-4b.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/vaarg-4b.c (working copy)
@@ -1,5 +1,5 @@
/* Test for cross x86_64<->w64 abi va_list calls. */
-/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin
-maccumulate-outgoing-args" } */
#include <stdarg.h>
Index: gcc.target/x86_64/abi/callabi/vaarg-5a.c
===================================================================
--- gcc.target/x86_64/abi/callabi/vaarg-5a.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/vaarg-5a.c (working copy)
@@ -1,6 +1,6 @@
/* Test for cross x86_64<->w64 abi va_list calls. */
/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
-/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin
-maccumulate-outgoing-args" } */
/* { dg-additional-sources "vaarg-5b.c" } */
extern void __attribute__ ((sysv_abi)) abort (void);
Index: gcc.target/x86_64/abi/callabi/vaarg-5b.c
===================================================================
--- gcc.target/x86_64/abi/callabi/vaarg-5b.c (revision 205996)
+++ gcc.target/x86_64/abi/callabi/vaarg-5b.c (working copy)
@@ -1,5 +1,5 @@
/* Test for cross x86_64<->w64 abi va_list calls. */
-/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin
-maccumulate-outgoing-args" } */
#include <stdarg.h>