diff mbox

[testsuite] : Fix various testsuite failures in gcc.target/i386

Message ID CAEwic4aehegnta22Jr+R1FAL+SSM9i1ba4ovWMswmqsuHf6W+w@mail.gmail.com
State New
Headers show

Commit Message

Kai Tietz Feb. 27, 2012, 7:21 a.m. UTC
Hello,

this patch fixes various testsuite failures in gcc.target/i386 for
mingw targets.

ChangeLog

2012-02-27  Kai Tietz  <ktietz@redhat.com>

	* gcc.target/i386/pr46939.c (long): Fix LP64 vs LLP64
	issue.
	* gcc.target/i386/pr45352-2.c: Likewise.
	* gcc.target/i386/bitfield3.c: Add -mno-ms-bitfields for
	mingw targets.
	* gcc.target/i386/xop-vshift-1.c(random): Use on mingw
	targets instead rand.
	* gcc.target/i386/sse4_1-blendps-2.c: Likewise.
	* gcc.target/i386/sse2-mul-1.c: Likewise.
	* gcc.target/i386/sse4_1-blendps.c: Likewise.
	* gcc.target/i386/pad-6b.c: Adjust test for x64 mingw
	target.
	* gcc.target/i386/pad-1.c: Likewise.
	* gcc.target/i386/pad-9.c: Likewise.
	* gcc.target/i386/pad-2.c: Likewise.
	* gcc.target/i386/pad-5b.c: Likewise.
	* gcc.target/i386/pad-8.c: Likewise.
	* gcc.target/i386/pr46470.c: Skip for x64 mingw target.
	* gcc.target/i386/pr44130.c: Likewise.
	* gcc.target/i386/align-main-1.c: Likewise.
	* gcc.target/i386/align-main-2.c: Likewise.
	* gcc.target/i386/sw-1.c: Likewise.
	* gcc.target/i386/avx-vzeroupper-5.c: Add -mabi=sysv
	on x64 mingw target.
	* gcc.target/i386/avx-vzeroupper-4.c: Likewise.
	* gcc.target/i386/pr46295.c: Likewise.
	* gcc.target/i386/amd64-abi-1.c: Likewise.
	* gcc.target/i386/amd64-abi-2.c: Likewise.
	* gcc.target/i386/pr39082-1.c: Likewise.
	* gcc.target/i386/pr39162.c: Likewise.
	* gcc.target/i386/pr22152.c: Likewise.
	* gcc.target/i386/wrgsbase-2.c: Adjust dg-final rule.
	* gcc.target/i386/wrfsbase-2.c: Likewise.
	* gcc.target/i386/local.c: Likewise
	* gcc.target/i386/wrgsbase-1.c: Likewise.
	* gcc.target/i386/wrfsbase-1.c: Likewise.
	* gcc.target/i386/pr39315-3.c: Likewise.
	* gcc.target/i386/pr35767-4.c: Likewise.
	* gcc.target/i386/pr45336-3.c (pextrd): Don't check for
	x64 mingw target.
	* gcc.target/i386/pr45336-2.c: Likewise.
	* gcc.target/i386/pr45336-1.c: Likewise.
	* gcc.target/i386/pr45336-4.c: Likewise.

Tested for i686-w64-mingw32, x86_64-w64-mingw64, and for
x86_64-unknown-linux-gnu.  Ok for apply?

Regards,
Kai

Comments

Mike Stump Feb. 27, 2012, 5:40 p.m. UTC | #1
On Feb 26, 2012, at 11:21 PM, Kai Tietz wrote:
> this patch fixes various testsuite failures in gcc.target/i386 for
> mingw targets.

> Ok for apply?

Ok.  [ any extra eyes that can spot any small detail I miss are always welcome ]
diff mbox

Patch

Index: gcc.target/i386/pr45336-4.c
===================================================================
--- gcc.target/i386/pr45336-4.c	(revision 184585)
+++ gcc.target/i386/pr45336-4.c	(working copy)
@@ -6,7 +6,7 @@ 
 /* { dg-final { scan-assembler "(cltq|movslq)" } } */
 /* { dg-final { scan-assembler "pextrb" } } */
 /* { dg-final { scan-assembler "pextrw" } } */
-/* { dg-final { scan-assembler "pextrd" } } */
+/* { dg-final { scan-assembler "pextrd" { target { ! x86_64-*-mingw* } } } } */

 #include <smmintrin.h>
 long long int foo8(__m128i x) { return (char) _mm_extract_epi8(x, 4); }
Index: gcc.target/i386/sse4_1-blendps.c
===================================================================
--- gcc.target/i386/sse4_1-blendps.c	(revision 184585)
+++ gcc.target/i386/sse4_1-blendps.c	(working copy)
@@ -16,6 +16,11 @@ 
 #include <string.h>
 #include <stdlib.h>

+/* mingw runtime don't provide random().  */
+#ifdef __MINGW32__
+#define random rand
+#endif
+
 #define NUM 20

 #ifndef MASK
Index: gcc.target/i386/pr22152.c
===================================================================
--- gcc.target/i386/pr22152.c	(revision 184585)
+++ gcc.target/i386/pr22152.c	(working copy)
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -msse2" } */
 /* { dg-options "-O2 -msse2 -mno-vect8-ret-in-mem" { target
i?86-*-solaris2.[89] *-*-vxworks* } } */
+/* { dg-additional-options "-mabi=sysv" { target x86_64-*-mingw* } } */

 #include <mmintrin.h>

Index: gcc.target/i386/wrfsbase-1.c
===================================================================
--- gcc.target/i386/wrfsbase-1.c	(revision 184585)
+++ gcc.target/i386/wrfsbase-1.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile { target { ! { ia32 } } } } */
 /* { dg-options "-O2 -mfsgsbase" } */
-/* { dg-final { scan-assembler "wrfsbase\[ \t]+(%|)edi" } } */
+/* { dg-final { scan-assembler "wrfsbase\[ \t]+(%|)(edi|ecx)" } } */

 #include <immintrin.h>

Index: gcc.target/i386/sw-1.c
===================================================================
--- gcc.target/i386/sw-1.c	(revision 184585)
+++ gcc.target/i386/sw-1.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -fshrink-wrap -fdump-rtl-pro_and_epilogue" } */
+/* { dg-skip-if "No shrink-wrapping preformed" { x86_64-*-mingw* } {
"*" } { "" } } */

 #include <string.h>

Index: gcc.target/i386/sse2-mul-1.c
===================================================================
--- gcc.target/i386/sse2-mul-1.c	(revision 184585)
+++ gcc.target/i386/sse2-mul-1.c	(working copy)
@@ -14,6 +14,11 @@ 

 #include <stdlib.h>

+/* mingw runtime don't provide random().  */
+#ifdef __MINGW32__
+#define random rand
+#endif
+
 #define N 512
 static short a1[N], a2[N], a3[N];
 static unsigned short b1[N], b2[N], b3[N];
Index: gcc.target/i386/pr45352-2.c
===================================================================
--- gcc.target/i386/pr45352-2.c	(revision 184585)
+++ gcc.target/i386/pr45352-2.c	(working copy)
@@ -4,6 +4,8 @@ 
 typedef char uint8_t;
 typedef uint32_t;
 typedef vo_frame_t;
+__extension__ typedef __SIZE_TYPE__ size_t;
+
 struct vo_frame_s
 {
     uint8_t base[3];
@@ -43,7 +45,7 @@ 
 static int bitstream_init (picture_t * picture, void *start)
 {
   picture->bitstream_ptr = start;
-  return (int) (long) start;
+  return (int) (size_t) start;
 }
 static slice_xvmc_init (picture_t * picture, int code)
 {
@@ -56,7 +58,7 @@ 
     picture->f_motion.ref
       [0]
       [0]
-      = (char) (long) (forward_reference_frame->base + (offset ?
picture->pitches[0] : 0));
+      = (char) (size_t) (forward_reference_frame->base + (offset ?
picture->pitches[0] : 0));
   picture->f_motion.ref[0][1] = (offset);
   if (picture->picture_structure)
       picture->pitches[0] <<= picture->pitches[1] <<= 1;
@@ -91,7 +93,7 @@ 
 mpeg2_xvmc_slice
   (mpeg2dec_accel_t * accel, picture_t * picture, int code, uint8_t
buffer,int mba_inc)
 {
-  xine_xvmc_t * xvmc = (xine_xvmc_t *) (long) bitstream_init
(picture, (void *) (long) buffer);
+  xine_xvmc_t * xvmc = (xine_xvmc_t *) (size_t) bitstream_init
(picture, (void *) (size_t) buffer);
   slice_xvmc_init (picture, code);
     while (1)
       {
Index: gcc.target/i386/amd64-abi-1.c
===================================================================
--- gcc.target/i386/amd64-abi-1.c	(revision 184585)
+++ gcc.target/i386/amd64-abi-1.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile { target { ! { ia32 } } } } */
 /* { dg-options "-mno-sse" } */
+/* { dg-additional-options "-mabi=sysv" { target *-*-mingw* } } */

 double foo(void) { return 0; }	/* { dg-error "SSE disabled" } */
 void bar(double x) { }
Index: gcc.target/i386/align-main-1.c
===================================================================
--- gcc.target/i386/align-main-1.c	(revision 184585)
+++ gcc.target/i386/align-main-1.c	(working copy)
@@ -4,10 +4,12 @@ 
 /* { dg-options "-O2 -mpreferred-stack-boundary=6
-mincoming-stack-boundary=6" } */
 /* { dg-final { scan-assembler "and\[lq\]?\[\\t \]*\\$-128,\[\\t
\]*%\[re\]?sp" } } */
 /* { dg-final { scan-assembler-not "and\[lq\]?\[\\t \]*\\$-64,\[\\t
\]*%\[re\]?sp" } } */
+/* { dg-skip-if "Options about stack-boundary aren't support" {
x86_64-*-mingw* } { "*" } { "" } } */

 #include <stddef.h>

 #define ALIGNMENT 128
+
 typedef int aligned __attribute__((aligned(ALIGNMENT)));
 extern void abort(void);

Index: gcc.target/i386/pr46939.c
===================================================================
--- gcc.target/i386/pr46939.c	(revision 184585)
+++ gcc.target/i386/pr46939.c	(working copy)
@@ -1,5 +1,8 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
+
+__extension__ typedef __SIZE_TYPE__ size_t;
+
 int
 php_filter_parse_int (char const *str, unsigned int str_len, long *ret)
 {
@@ -23,7 +26,7 @@ 
     default:;
       break;
     }
-  if ((unsigned long) str < (unsigned long) end)
+  if ((size_t) str < (size_t) end)
     {
       if ((int const) *str >= 49)
 	{
@@ -59,7 +62,7 @@ 
     {
       return (-1);
     }
-  while ((unsigned long) str < (unsigned long) end)
+  while ((size_t) str < (size_t) end)
     {
       if ((int const) *str >= 48)
 	{
Index: gcc.target/i386/pr39082-1.c
===================================================================
--- gcc.target/i386/pr39082-1.c	(revision 184585)
+++ gcc.target/i386/pr39082-1.c	(working copy)
@@ -1,6 +1,7 @@ 
 /* PR target/39082 */
 /* { dg-do compile { target { ! { ia32 } } } } */
 /* { dg-options "-O2" } */
+/* { dg-additional-options "-mabi=sysv" { target x86_64-*-mingw* } } */

 union un
 {
Index: gcc.target/i386/pr39162.c
===================================================================
--- gcc.target/i386/pr39162.c	(revision 184585)
+++ gcc.target/i386/pr39162.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -Wno-psabi -msse2 -mno-avx" } */
+/* { dg-additional-options "-mabi=sysv" { target x86_64-*-mingw* } } */

 typedef long long __m256i __attribute__ ((__vector_size__ (32),
__may_alias__));

Index: gcc.target/i386/wrfsbase-2.c
===================================================================
--- gcc.target/i386/wrfsbase-2.c	(revision 184585)
+++ gcc.target/i386/wrfsbase-2.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile { target { ! { ia32 } } } } */
 /* { dg-options "-O2 -mfsgsbase" } */
-/* { dg-final { scan-assembler "wrfsbase\[ \t]+(%|)rdi" } } */
+/* { dg-final { scan-assembler "wrfsbase\[ \t]+(%|)(rdi|rcx)" } } */

 #include <immintrin.h>

Index: gcc.target/i386/pad-5b.c
===================================================================
--- gcc.target/i386/pad-5b.c	(revision 184585)
+++ gcc.target/i386/pad-5b.c	(working copy)
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { ! { ia32 } } } } */
 /* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } {
"-march=atom" } } */
 /* { dg-options "-O2 -fomit-frame-pointer -march=atom" } */
-/* { dg-final { scan-assembler-times "nop" 4 } } */
+/* { dg-final { scan-assembler-times "nop" 4 { target { !
x86_64-*-mingw* } } } } */
+/* { dg-final { scan-assembler-times "nop" 2 { target {
x86_64-*-mingw* } } } } */
 /* { dg-final { scan-assembler-not "rep" } } */

 int
Index: gcc.target/i386/pad-8.c
===================================================================
--- gcc.target/i386/pad-8.c	(revision 184585)
+++ gcc.target/i386/pad-8.c	(working copy)
@@ -1,7 +1,8 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } {
"-march=atom" } } */
 /* { dg-options "-O2 -fomit-frame-pointer -march=atom" } */
-/* { dg-final { scan-assembler-times "nop" 6 } } */
+/* { dg-final { scan-assembler-times "nop" 6 { target { !
x86_64-*-mingw* } } } } */
+/* { dg-final { scan-assembler-times "nop" 4 { target {
x86_64-*-mingw* } } } } */
 /* { dg-final { scan-assembler-not "rep" } } */

 int
Index: gcc.target/i386/sse4_1-blendps-2.c
===================================================================
--- gcc.target/i386/sse4_1-blendps-2.c	(revision 184585)
+++ gcc.target/i386/sse4_1-blendps-2.c	(working copy)
@@ -8,6 +8,11 @@ 
 #include <string.h>
 #include <stdlib.h>

+/* mingw runtime don't provide random().  */
+#ifdef __MINGW32__
+#define random rand
+#endif
+
 #define NUM 20

 #undef MASK
Index: gcc.target/i386/bitfield3.c
===================================================================
--- gcc.target/i386/bitfield3.c	(revision 184585)
+++ gcc.target/i386/bitfield3.c	(working copy)
@@ -1,7 +1,8 @@ 
 // Test for bitfield alignment in structs on IA-32
 // { dg-do run }
 // { dg-options "-O2" }
-// { dg-options "-mno-align-double -mno-ms-bitfields" { target *-*-interix* } }
+// { dg-additional-options "-mno-align-double -mno-ms-bitfields" {
target *-*-interix* } }
+// { dg-additional-options "-mno-ms-bitfields" { target *-*-mingw* } }

 extern void abort (void);
 extern void exit (int);
Index: gcc.target/i386/amd64-abi-2.c
===================================================================
--- gcc.target/i386/amd64-abi-2.c	(revision 184585)
+++ gcc.target/i386/amd64-abi-2.c	(working copy)
@@ -1,6 +1,8 @@ 
 /* PR target/26223 */
 /* { dg-do compile { target { ! { ia32 } } } } */
 /* { dg-options "-mno-80387" } */
+/* { dg-additional-options "-mabi=sysv" { target *-*-mingw* } } */
+
 long double foo(long double x) { return x; } /* { dg-error "x87 disabled" } */
 long double bar(long double x) { return x; }

Index: gcc.target/i386/align-main-2.c
===================================================================
--- gcc.target/i386/align-main-2.c	(revision 184585)
+++ gcc.target/i386/align-main-2.c	(working copy)
@@ -4,7 +4,7 @@ 
 /* { dg-options "-O2 -mpreferred-stack-boundary=6
-mincoming-stack-boundary=6" } */
 /* { dg-final { scan-assembler "and\[lq\]?\[\\t \]*\\$-64,\[\\t
\]*%\[re\]?sp" } } */
 /* { dg-final { scan-assembler-not "and\[lq\]?\[\\t \]*\\$-128,\[\\t
\]*%\[re\]?sp" } } */
-
+/* { dg-skip-if "Options about stack-boundary aren't support" {
x86_64-*-mingw* } { "*" } { "" } } */
 #include <stddef.h>

 #define ALIGNMENT 32
Index: gcc.target/i386/pr44130.c
===================================================================
--- gcc.target/i386/pr44130.c	(revision 184585)
+++ gcc.target/i386/pr44130.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -mavx -mtune=generic" } */
+/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */
 /* { dg-final { scan-assembler "and\[lq\]?\[\\t \]*\\$-32,\[\\t
\]*%\[re\]?sp" } } */
 /* { dg-final { scan-assembler "vmovaps\[\\t \]*%ymm" } } */

Index: gcc.target/i386/pad-1.c
===================================================================
--- gcc.target/i386/pad-1.c	(revision 184585)
+++ gcc.target/i386/pad-1.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -fomit-frame-pointer -mtune=generic" } */
-/* { dg-final { scan-assembler "rep" } } */
+/* { dg-final { scan-assembler "rep" { target { ! x86_64-*-mingw* } } } } */
 /* { dg-final { scan-assembler-not "nop" } } */

 void
Index: gcc.target/i386/pad-9.c
===================================================================
--- gcc.target/i386/pad-9.c	(revision 184585)
+++ gcc.target/i386/pad-9.c	(working copy)
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { ! { ia32 } } } } */
 /* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } {
"-march=atom" } } */
 /* { dg-options "-O2 -fomit-frame-pointer -march=atom" } */
-/* { dg-final { scan-assembler-times "nop" 4 } } */
+/* { dg-final { scan-assembler-times "nop" 4 { target { !
x86_64-*-mingw* } } } } */
+/* { dg-final { scan-assembler-times "nop" 2 { target {
x86_64-*-mingw* } } } } */
 /* { dg-final { scan-assembler-not "rep" } } */

 extern void bar (void);
Index: gcc.target/i386/pad-2.c
===================================================================
--- gcc.target/i386/pad-2.c	(revision 184585)
+++ gcc.target/i386/pad-2.c	(working copy)
@@ -1,7 +1,8 @@ 
 /* { dg-do compile } */
 /* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } {
"-march=atom" } } */
 /* { dg-options "-O2 -fomit-frame-pointer -march=atom" } */
-/* { dg-final { scan-assembler-times "nop" 8 } } */
+/* { dg-final { scan-assembler-times "nop" 8 { target { !
x86_64-*-mingw* } } } } */
+/* { dg-final { scan-assembler-times "nop" 6 { target {
x86_64-*-mingw* } } } } */
 /* { dg-final { scan-assembler-not "rep" } } */

 void
Index: gcc.target/i386/pr45336-1.c
===================================================================
--- gcc.target/i386/pr45336-1.c	(revision 184585)
+++ gcc.target/i386/pr45336-1.c	(working copy)
@@ -8,7 +8,7 @@ 
 /* { dg-final { scan-assembler-not "cwtl" } } */
 /* { dg-final { scan-assembler "pextrb" } } */
 /* { dg-final { scan-assembler "pextrw" } } */
-/* { dg-final { scan-assembler "pextrd" } } */
+/* { dg-final { scan-assembler "pextrd" { target { ! x86_64-*-mingw* } } } } */

 #include <smmintrin.h>
 unsigned int foo8(__m128i x) { return _mm_extract_epi8(x, 4); }
Index: gcc.target/i386/pr35767-4.c
===================================================================
--- gcc.target/i386/pr35767-4.c	(revision 184585)
+++ gcc.target/i386/pr35767-4.c	(working copy)
@@ -3,7 +3,7 @@ 
 /* { dg-require-effective-target dfp } */
 /* { dg-options "-O -march=x86-64 -mtune=generic -std=gnu99" } */
 /* { dg-final { scan-assembler-not "movdqu" } } */
-/* { dg-final { scan-assembler "movdqa" } } */
+/* { dg-final { scan-assembler "movdqa" { target { ! x86_64-*-mingw* } } } } */

 extern _Decimal128 foo (_Decimal128, _Decimal128, _Decimal128);

Index: gcc.target/i386/pr39315-3.c
===================================================================
--- gcc.target/i386/pr39315-3.c	(revision 184585)
+++ gcc.target/i386/pr39315-3.c	(working copy)
@@ -4,7 +4,7 @@ 
 /* { dg-final { scan-assembler-not "movups" } } */
 /* { dg-final { scan-assembler-not "movlps" } } */
 /* { dg-final { scan-assembler-not "movhps" } } */
-/* { dg-final { scan-assembler "and\[lq\]?\[\\t \]*\\$-128,\[\\t
\]*%\[re\]?sp" } } */
+/* { dg-final { scan-assembler "and\[lq\]?\[\\t \]*\\$-128,\[\\t
\]*%\[re\]?sp" { target { ! x86_64-*-mingw* } } } } */
 /* { dg-final { scan-assembler "movaps" } } */

 typedef float __m128 __attribute__ ((__vector_size__ (16)));
Index: gcc.target/i386/xop-vshift-1.c
===================================================================
--- gcc.target/i386/xop-vshift-1.c	(revision 184585)
+++ gcc.target/i386/xop-vshift-1.c	(working copy)
@@ -19,6 +19,11 @@ 
 #define TYPE2 long long
 #endif

+/* mingw runtime don't provide random().  */
+#ifdef __MINGW32__
+#define random rand
+#endif
+
 signed TYPE1 a[N], b[N], g[N];
 unsigned TYPE1 c[N], h[N];
 signed TYPE2 d[N], e[N], j[N];
Index: gcc.target/i386/pr46295.c
===================================================================
--- gcc.target/i386/pr46295.c	(revision 184585)
+++ gcc.target/i386/pr46295.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -mavx -mtune=generic -dp" } */
+/* { dg-additional-options "-mabi=sysv" { target x86_64-*-mingw* } } */

 typedef double EXPRESS[5];
 void Parse_Rel_Factor (EXPRESS Express,int *Terms);
Index: gcc.target/i386/avx-vzeroupper-4.c
===================================================================
--- gcc.target/i386/avx-vzeroupper-4.c	(revision 184585)
+++ gcc.target/i386/avx-vzeroupper-4.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O0 -mavx -mvzeroupper -dp" } */
+/* { dg-additional-options "-mabi=sysv" { target x86_64-*-mingw* } } */

 typedef float __m256 __attribute__ ((__vector_size__ (32), __may_alias__));

Index: gcc.target/i386/pad-6b.c
===================================================================
--- gcc.target/i386/pad-6b.c	(revision 184585)
+++ gcc.target/i386/pad-6b.c	(working copy)
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { ! { ia32 } } } } */
 /* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } {
"-march=atom" } } */
 /* { dg-options "-O2 -fomit-frame-pointer -march=atom" } */
-/* { dg-final { scan-assembler-times "nop" 6 } } */
+/* { dg-final { scan-assembler-times "nop" 6 { target { !
x86_64-*-mingw* } } } } */
+/* { dg-final { scan-assembler-times "nop" 4 { target {
x86_64-*-mingw* } } } } */
 /* { dg-final { scan-assembler-not "rep" } } */

 int
Index: gcc.target/i386/wrgsbase-1.c
===================================================================
--- gcc.target/i386/wrgsbase-1.c	(revision 184585)
+++ gcc.target/i386/wrgsbase-1.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile { target { ! { ia32 } } } } */
 /* { dg-options "-O2 -mfsgsbase" } */
-/* { dg-final { scan-assembler "wrgsbase\[ \t]+(%|)edi" } } */
+/* { dg-final { scan-assembler "wrgsbase\[ \t]+(%|)(edi|ecx)" } } */

 #include <immintrin.h>

Index: gcc.target/i386/pr45336-2.c
===================================================================
--- gcc.target/i386/pr45336-2.c	(revision 184585)
+++ gcc.target/i386/pr45336-2.c	(working copy)
@@ -9,7 +9,7 @@ 
 /* { dg-final { scan-assembler-not "cltq" } } */
 /* { dg-final { scan-assembler "pextrb" } } */
 /* { dg-final { scan-assembler "pextrw" } } */
-/* { dg-final { scan-assembler "pextrd" } } */
+/* { dg-final { scan-assembler "pextrd" { target { ! x86_64-*-mingw* } } } } */

 #include <smmintrin.h>
 unsigned long long int foo8(__m128i x) { return _mm_extract_epi8(x, 4); }
Index: gcc.target/i386/pr46470.c
===================================================================
--- gcc.target/i386/pr46470.c	(revision 184585)
+++ gcc.target/i386/pr46470.c	(working copy)
@@ -6,7 +6,8 @@ 
    transformed to push+pop.  We also want to force unwind info updates.  */
 /* { dg-options "-Os -fomit-frame-pointer -fasynchronous-unwind-tables" } */
 /* { dg-options "-Os -fomit-frame-pointer
-mpreferred-stack-boundary=3 -fasynchronous-unwind-tables" { target
ia32 } } */
-
+/* ms_abi has reserved stack-region.  */
+/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */
 void f();
 void g() { f(); f(); }

Index: gcc.target/i386/local.c
===================================================================
--- gcc.target/i386/local.c	(revision 184585)
+++ gcc.target/i386/local.c	(working copy)
@@ -1,7 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -funit-at-a-time" } */
 /* { dg-final { scan-assembler "magic\[^\\n\]*eax" { target ia32 } } } */
-/* { dg-final { scan-assembler "magic\[^\\n\]*edi" { target { ! {
ia32 } } } } } */
+/* { dg-final { scan-assembler "magic\[^\\n\]*(edi|ecx)" { target { !
{ ia32 } } } } } */

 /* Verify that local calling convention is used.  */
 static t(int) __attribute__ ((noinline));
Index: gcc.target/i386/avx-vzeroupper-5.c
===================================================================
--- gcc.target/i386/avx-vzeroupper-5.c	(revision 184585)
+++ gcc.target/i386/avx-vzeroupper-5.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O0 -mavx -mvzeroupper -dp" } */
+/* { dg-additional-options "-mabi=sysv" { target x86_64-*-mingw* } } */

 #include <immintrin.h>

Index: gcc.target/i386/wrgsbase-2.c
===================================================================
--- gcc.target/i386/wrgsbase-2.c	(revision 184585)
+++ gcc.target/i386/wrgsbase-2.c	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile { target { ! { ia32 } } } } */
 /* { dg-options "-O2 -mfsgsbase" } */
-/* { dg-final { scan-assembler "wrgsbase\[ \t]+(%|)rdi" } } */
+/* { dg-final { scan-assembler "wrgsbase\[ \t]+(%|)(rdi|rcx)" } } */

 #include <immintrin.h>

Index: gcc.target/i386/pr45336-3.c
===================================================================
--- gcc.target/i386/pr45336-3.c	(revision 184585)
+++ gcc.target/i386/pr45336-3.c	(working copy)
@@ -5,7 +5,7 @@ 
 /* { dg-final { scan-assembler "(movswl|cwtl)" } } */
 /* { dg-final { scan-assembler "pextrb" } } */
 /* { dg-final { scan-assembler "pextrw" } } */
-/* { dg-final { scan-assembler "pextrd" } } */
+/* { dg-final { scan-assembler "pextrd" { target { ! x86_64-*-mingw* } } } } */

 #include <smmintrin.h>
 int foo8(__m128i x) { return (char) _mm_extract_epi8(x, 4); }