From patchwork Mon Feb 27 07:21:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 143159 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 7C677B6FC3 for ; Mon, 27 Feb 2012 18:21:41 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1330932102; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Received-SPF:Received:MIME-Version:Received:Received:Date: Message-ID:Subject:From:To:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=oh1V/qCN2utZvd7eVaSwg0ANt4g=; b=INoLKOVqFiy6PNQ Ngd7xfvq3T6vIpFXxc56DY12b6xu8Rp1Ght0eDkHIS5orzitQ2PvOIgVaWXDaq9r iKJ5rtWp3Qs22NGiCrVCKgq44dnD56BwMA8rZGql8qDWGyTRNPWxcT7xUlCBTt4U 5ghbQ2+YVw3ADo27Wc2AMgTscbUI= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received-SPF:Authentication-Results:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=HZpUaJdafQEb+Mg0/t3vwClto31gYqR1llPO2UimsPGItKJlZ0rbRDsZQn5rqp ngrIcFFBvPxLdq2Li0tXCVQCNUR3jnkBD6EynNyH/HE4BOmvlNfkLIZrgf9wiQKb mFP9zMGIc7tqV8BX2ht+S+WMZxonGF964xEQVrlw+N2hY=; Received: (qmail 24713 invoked by alias); 27 Feb 2012 07:21:33 -0000 Received: (qmail 24697 invoked by uid 22791); 27 Feb 2012 07:21:29 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_AV, TW_DF, TW_MV, TW_VZ, TW_XV X-Spam-Check-By: sourceware.org Received: from mail-tul01m020-f175.google.com (HELO mail-tul01m020-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Feb 2012 07:21:12 +0000 Received: by obhx4 with SMTP id x4so5323150obh.20 for ; Sun, 26 Feb 2012 23:21:11 -0800 (PST) Received-SPF: pass (google.com: domain of ktietz70@googlemail.com designates 10.182.72.69 as permitted sender) client-ip=10.182.72.69; Authentication-Results: mr.google.com; spf=pass (google.com: domain of ktietz70@googlemail.com designates 10.182.72.69 as permitted sender) smtp.mail=ktietz70@googlemail.com; dkim=pass header.i=ktietz70@googlemail.com Received: from mr.google.com ([10.182.72.69]) by 10.182.72.69 with SMTP id b5mr4396633obv.77.1330327271748 (num_hops = 1); Sun, 26 Feb 2012 23:21:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.72.69 with SMTP id b5mr3957557obv.77.1330327271630; Sun, 26 Feb 2012 23:21:11 -0800 (PST) Received: by 10.182.33.103 with HTTP; Sun, 26 Feb 2012 23:21:11 -0800 (PST) Date: Mon, 27 Feb 2012 08:21:11 +0100 Message-ID: Subject: [patch testsuite]: Fix various testsuite failures in gcc.target/i386 From: Kai Tietz To: GCC Patches X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hello, this patch fixes various testsuite failures in gcc.target/i386 for mingw targets. ChangeLog 2012-02-27 Kai Tietz * 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 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 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 #include +/* 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 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 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 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 +/* 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 #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 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 #include +/* 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 #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 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 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 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 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 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 int foo8(__m128i x) { return (char) _mm_extract_epi8(x, 4); }