diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386')
40 files changed, 111 insertions, 26 deletions
diff --git a/gcc/testsuite/gcc.target/i386/align-main-1.c b/gcc/testsuite/gcc.target/i386/align-main-1.c index 699c7f80c5c..f62284f4379 100644 --- a/gcc/testsuite/gcc.target/i386/align-main-1.c +++ b/gcc/testsuite/gcc.target/i386/align-main-1.c @@ -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); diff --git a/gcc/testsuite/gcc.target/i386/align-main-2.c b/gcc/testsuite/gcc.target/i386/align-main-2.c index 65c49e7f5dd..b8175891832 100644 --- a/gcc/testsuite/gcc.target/i386/align-main-2.c +++ b/gcc/testsuite/gcc.target/i386/align-main-2.c @@ -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 diff --git a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c index 6aa7063f547..8988f79c73d 100644 --- a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c +++ b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c @@ -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) { } diff --git a/gcc/testsuite/gcc.target/i386/amd64-abi-2.c b/gcc/testsuite/gcc.target/i386/amd64-abi-2.c index acc2a9e6e19..6146e8efa29 100644 --- a/gcc/testsuite/gcc.target/i386/amd64-abi-2.c +++ b/gcc/testsuite/gcc.target/i386/amd64-abi-2.c @@ -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; } diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-4.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-4.c index c55c814316c..4676617607e 100644 --- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-4.c +++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-4.c @@ -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__)); diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-5.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-5.c index a14460cf8a4..0f54602b8c8 100644 --- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-5.c +++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-5.c @@ -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> diff --git a/gcc/testsuite/gcc.target/i386/bitfield3.c b/gcc/testsuite/gcc.target/i386/bitfield3.c index 139f4d46160..1a161597cfe 100644 --- a/gcc/testsuite/gcc.target/i386/bitfield3.c +++ b/gcc/testsuite/gcc.target/i386/bitfield3.c @@ -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); diff --git a/gcc/testsuite/gcc.target/i386/local.c b/gcc/testsuite/gcc.target/i386/local.c index 872fd4d808b..4423001f664 100644 --- a/gcc/testsuite/gcc.target/i386/local.c +++ b/gcc/testsuite/gcc.target/i386/local.c @@ -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)); diff --git a/gcc/testsuite/gcc.target/i386/pad-1.c b/gcc/testsuite/gcc.target/i386/pad-1.c index 770c44d8900..c2e27c9e641 100644 --- a/gcc/testsuite/gcc.target/i386/pad-1.c +++ b/gcc/testsuite/gcc.target/i386/pad-1.c @@ -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 diff --git a/gcc/testsuite/gcc.target/i386/pad-2.c b/gcc/testsuite/gcc.target/i386/pad-2.c index 05b19d3887a..fe45c19d143 100644 --- a/gcc/testsuite/gcc.target/i386/pad-2.c +++ b/gcc/testsuite/gcc.target/i386/pad-2.c @@ -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 diff --git a/gcc/testsuite/gcc.target/i386/pad-5b.c b/gcc/testsuite/gcc.target/i386/pad-5b.c index a3c9d30c3ac..4cd03409233 100644 --- a/gcc/testsuite/gcc.target/i386/pad-5b.c +++ b/gcc/testsuite/gcc.target/i386/pad-5b.c @@ -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 diff --git a/gcc/testsuite/gcc.target/i386/pad-6b.c b/gcc/testsuite/gcc.target/i386/pad-6b.c index e4956f0c1d1..82a3d331c46 100644 --- a/gcc/testsuite/gcc.target/i386/pad-6b.c +++ b/gcc/testsuite/gcc.target/i386/pad-6b.c @@ -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 diff --git a/gcc/testsuite/gcc.target/i386/pad-8.c b/gcc/testsuite/gcc.target/i386/pad-8.c index ebb6e720006..634cd7417ce 100644 --- a/gcc/testsuite/gcc.target/i386/pad-8.c +++ b/gcc/testsuite/gcc.target/i386/pad-8.c @@ -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 diff --git a/gcc/testsuite/gcc.target/i386/pad-9.c b/gcc/testsuite/gcc.target/i386/pad-9.c index b1a58158a87..226a0932bf1 100644 --- a/gcc/testsuite/gcc.target/i386/pad-9.c +++ b/gcc/testsuite/gcc.target/i386/pad-9.c @@ -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); diff --git a/gcc/testsuite/gcc.target/i386/pr22152.c b/gcc/testsuite/gcc.target/i386/pr22152.c index 4fade89ee7f..6d24432cfb3 100644 --- a/gcc/testsuite/gcc.target/i386/pr22152.c +++ b/gcc/testsuite/gcc.target/i386/pr22152.c @@ -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> diff --git a/gcc/testsuite/gcc.target/i386/pr35767-4.c b/gcc/testsuite/gcc.target/i386/pr35767-4.c index e12f64ffe98..1b58cfd4af6 100644 --- a/gcc/testsuite/gcc.target/i386/pr35767-4.c +++ b/gcc/testsuite/gcc.target/i386/pr35767-4.c @@ -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); diff --git a/gcc/testsuite/gcc.target/i386/pr39082-1.c b/gcc/testsuite/gcc.target/i386/pr39082-1.c index f2a1fdf9817..1d8be2a7d98 100644 --- a/gcc/testsuite/gcc.target/i386/pr39082-1.c +++ b/gcc/testsuite/gcc.target/i386/pr39082-1.c @@ -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 { diff --git a/gcc/testsuite/gcc.target/i386/pr39162.c b/gcc/testsuite/gcc.target/i386/pr39162.c index 09ea615e8f2..c549106adbb 100644 --- a/gcc/testsuite/gcc.target/i386/pr39162.c +++ b/gcc/testsuite/gcc.target/i386/pr39162.c @@ -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__)); diff --git a/gcc/testsuite/gcc.target/i386/pr39315-3.c b/gcc/testsuite/gcc.target/i386/pr39315-3.c index 07862db603a..3b61ad0253b 100644 --- a/gcc/testsuite/gcc.target/i386/pr39315-3.c +++ b/gcc/testsuite/gcc.target/i386/pr39315-3.c @@ -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))); diff --git a/gcc/testsuite/gcc.target/i386/pr44130.c b/gcc/testsuite/gcc.target/i386/pr44130.c index 5c18bfaf753..3e50c7b1535 100644 --- a/gcc/testsuite/gcc.target/i386/pr44130.c +++ b/gcc/testsuite/gcc.target/i386/pr44130.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr45336-1.c b/gcc/testsuite/gcc.target/i386/pr45336-1.c index e2b4f658a3f..db6c9400d3b 100644 --- a/gcc/testsuite/gcc.target/i386/pr45336-1.c +++ b/gcc/testsuite/gcc.target/i386/pr45336-1.c @@ -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); } diff --git a/gcc/testsuite/gcc.target/i386/pr45336-2.c b/gcc/testsuite/gcc.target/i386/pr45336-2.c index 45d93b71bd7..3e51591fc45 100644 --- a/gcc/testsuite/gcc.target/i386/pr45336-2.c +++ b/gcc/testsuite/gcc.target/i386/pr45336-2.c @@ -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); } diff --git a/gcc/testsuite/gcc.target/i386/pr45336-3.c b/gcc/testsuite/gcc.target/i386/pr45336-3.c index 055e3148703..b2168c006c5 100644 --- a/gcc/testsuite/gcc.target/i386/pr45336-3.c +++ b/gcc/testsuite/gcc.target/i386/pr45336-3.c @@ -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); } diff --git a/gcc/testsuite/gcc.target/i386/pr45336-4.c b/gcc/testsuite/gcc.target/i386/pr45336-4.c index c9850e533ac..8b66a6a1da5 100644 --- a/gcc/testsuite/gcc.target/i386/pr45336-4.c +++ b/gcc/testsuite/gcc.target/i386/pr45336-4.c @@ -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); } diff --git a/gcc/testsuite/gcc.target/i386/pr45352-2.c b/gcc/testsuite/gcc.target/i386/pr45352-2.c index 5f9ebb18fc8..52e5522a879 100644 --- a/gcc/testsuite/gcc.target/i386/pr45352-2.c +++ b/gcc/testsuite/gcc.target/i386/pr45352-2.c @@ -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 @@ mpeg2dec_accel_t; 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 @@ static slice_xvmc_init (picture_t * picture, int code) 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 @@ void 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) { diff --git a/gcc/testsuite/gcc.target/i386/pr46295.c b/gcc/testsuite/gcc.target/i386/pr46295.c index 219f34e8fe9..b7fccb7fb34 100644 --- a/gcc/testsuite/gcc.target/i386/pr46295.c +++ b/gcc/testsuite/gcc.target/i386/pr46295.c @@ -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); diff --git a/gcc/testsuite/gcc.target/i386/pr46470.c b/gcc/testsuite/gcc.target/i386/pr46470.c index 4035d1a1510..11eb51a0394 100644 --- a/gcc/testsuite/gcc.target/i386/pr46470.c +++ b/gcc/testsuite/gcc.target/i386/pr46470.c @@ -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(); } diff --git a/gcc/testsuite/gcc.target/i386/pr46716.c b/gcc/testsuite/gcc.target/i386/pr46716.c new file mode 100644 index 00000000000..29c5e1e4920 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr46716.c @@ -0,0 +1,33 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -msse -mno-sse2" } */ +/* { dg-require-effective-target sse } */ + +#include "sse-check.h" + +typedef double V __attribute__ ((__vector_size__ (16), __may_alias__)); +typedef union +{ + V x; + double a[2]; +} u; + +#define EMM_FLT8(a) ((double *)&(a)) + +void __attribute__ ((noinline)) +test (V s1, V s2) +{ + if (EMM_FLT8(s1)[0] != EMM_FLT8(s2)[0] + || EMM_FLT8(s1)[1] != EMM_FLT8(s2)[1]) + abort (); +} + +static void +sse_test (void) +{ + u s1; + + s1.a[0] = 1.0; + s1.a[1] = 2.0; + + test (s1.x, s1.x); +} diff --git a/gcc/testsuite/gcc.target/i386/pr46939.c b/gcc/testsuite/gcc.target/i386/pr46939.c index 2f50e37ee01..0fd8607bbdd 100644 --- a/gcc/testsuite/gcc.target/i386/pr46939.c +++ b/gcc/testsuite/gcc.target/i386/pr46939.c @@ -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 @@ php_filter_parse_int (char const *str, unsigned int str_len, long *ret) 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 @@ php_filter_parse_int (char const *str, unsigned int str_len, long *ret) { return (-1); } - while ((unsigned long) str < (unsigned long) end) + while ((size_t) str < (size_t) end) { if ((int const) *str >= 48) { diff --git a/gcc/testsuite/gcc.target/i386/pr52146.c b/gcc/testsuite/gcc.target/i386/pr52146.c index a4804e67797..4eb91c06dd6 100644 --- a/gcc/testsuite/gcc.target/i386/pr52146.c +++ b/gcc/testsuite/gcc.target/i386/pr52146.c @@ -15,4 +15,4 @@ test2 (void) *apic_tpr_addr = 0; } -/* { dg-final { scan-assembler-not "-18874240" } } */ +/* { dg-final { scan-assembler-not "\[,\\t \]+-18874240" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr52330.c b/gcc/testsuite/gcc.target/i386/pr52330.c new file mode 100644 index 00000000000..22ba0b21aed --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr52330.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-O0" } */ + +void foo (int a) +{ + asm volatile ("# %H0" : : "r" (a)); /* { dg-error "not an offsettable" } */ +} diff --git a/gcc/testsuite/gcc.target/i386/sse2-mul-1.c b/gcc/testsuite/gcc.target/i386/sse2-mul-1.c index 5c792e8a4aa..9cdc12763b0 100644 --- a/gcc/testsuite/gcc.target/i386/sse2-mul-1.c +++ b/gcc/testsuite/gcc.target/i386/sse2-mul-1.c @@ -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]; diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-blendps-2.c b/gcc/testsuite/gcc.target/i386/sse4_1-blendps-2.c index d569acf0af9..8fe71b71c57 100644 --- a/gcc/testsuite/gcc.target/i386/sse4_1-blendps-2.c +++ b/gcc/testsuite/gcc.target/i386/sse4_1-blendps-2.c @@ -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 diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-blendps.c b/gcc/testsuite/gcc.target/i386/sse4_1-blendps.c index aa073f33890..3f4b335aca6 100644 --- a/gcc/testsuite/gcc.target/i386/sse4_1-blendps.c +++ b/gcc/testsuite/gcc.target/i386/sse4_1-blendps.c @@ -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 diff --git a/gcc/testsuite/gcc.target/i386/sw-1.c b/gcc/testsuite/gcc.target/i386/sw-1.c index 483d117ecb7..fcb1bbd80ba 100644 --- a/gcc/testsuite/gcc.target/i386/sw-1.c +++ b/gcc/testsuite/gcc.target/i386/sw-1.c @@ -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> diff --git a/gcc/testsuite/gcc.target/i386/wrfsbase-1.c b/gcc/testsuite/gcc.target/i386/wrfsbase-1.c index 8b55ce69ab2..dc1503817b8 100644 --- a/gcc/testsuite/gcc.target/i386/wrfsbase-1.c +++ b/gcc/testsuite/gcc.target/i386/wrfsbase-1.c @@ -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> diff --git a/gcc/testsuite/gcc.target/i386/wrfsbase-2.c b/gcc/testsuite/gcc.target/i386/wrfsbase-2.c index 5accd793424..fc4a7b5fff7 100644 --- a/gcc/testsuite/gcc.target/i386/wrfsbase-2.c +++ b/gcc/testsuite/gcc.target/i386/wrfsbase-2.c @@ -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> diff --git a/gcc/testsuite/gcc.target/i386/wrgsbase-1.c b/gcc/testsuite/gcc.target/i386/wrgsbase-1.c index 20cd9456fed..5474288be0c 100644 --- a/gcc/testsuite/gcc.target/i386/wrgsbase-1.c +++ b/gcc/testsuite/gcc.target/i386/wrgsbase-1.c @@ -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> diff --git a/gcc/testsuite/gcc.target/i386/wrgsbase-2.c b/gcc/testsuite/gcc.target/i386/wrgsbase-2.c index 52a3c348926..cf947508423 100644 --- a/gcc/testsuite/gcc.target/i386/wrgsbase-2.c +++ b/gcc/testsuite/gcc.target/i386/wrgsbase-2.c @@ -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> diff --git a/gcc/testsuite/gcc.target/i386/xop-vshift-1.c b/gcc/testsuite/gcc.target/i386/xop-vshift-1.c index 01198e88a42..ee3d2990390 100644 --- a/gcc/testsuite/gcc.target/i386/xop-vshift-1.c +++ b/gcc/testsuite/gcc.target/i386/xop-vshift-1.c @@ -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]; |