diff options
Diffstat (limited to 'gcc/testsuite/gcc.target')
10 files changed, 118 insertions, 10 deletions
diff --git a/gcc/testsuite/gcc.target/arm/neon/polytypes.c b/gcc/testsuite/gcc.target/arm/neon/polytypes.c index 9aca6671ae0..12e9b0a7f6a 100644 --- a/gcc/testsuite/gcc.target/arm/neon/polytypes.c +++ b/gcc/testsuite/gcc.target/arm/neon/polytypes.c @@ -28,7 +28,8 @@ void foo () poly8x16_t v128_8; poly16x8_t v128_16; - s64_8 (v64_8); /* { dg-error "use -flax-vector-conversions.*incompatible type for argument 1 of 's64_8'" } */ + s64_8 (v64_8); /* { dg-message "use -flax-vector-conversions" } */ + /* { dg-error "incompatible type for argument 1 of 's64_8'" "" { target *-*-* } 31 } */ u64_8 (v64_8); /* { dg-error "incompatible type for argument 1 of 'u64_8'" } */ p64_8 (v64_8); diff --git a/gcc/testsuite/gcc.target/i386/float128-1.c b/gcc/testsuite/gcc.target/i386/float128-1.c new file mode 100644 index 00000000000..9c6d22745f0 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/float128-1.c @@ -0,0 +1,24 @@ +/* { dg-do run { target *-*-linux* } } */ +/* { dg-options "-O2 -msse2" } */ + +#include "sse2-check.h" + +extern void abort (void); + +typedef _Complex float __attribute__((mode(TC))) _Complex128; + +_Complex128 __attribute__ ((noinline)) +foo (_Complex128 x, _Complex128 y) +{ + return x * y; +} + +static void +sse2_test (void) +{ + _Complex128 a = 1.3q + 3.4qi, b = 5.6q + 7.8qi, c; + + c = foo (a, b); + if (__real__(c) == 0.0q || __imag__ (c) == 0.0q) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/float128-2.c b/gcc/testsuite/gcc.target/i386/float128-2.c new file mode 100644 index 00000000000..94408d2ef35 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/float128-2.c @@ -0,0 +1,17 @@ +/* PR target/36710 */ + +/* { dg-do run { target *-*-linux* *-*-darwin* } } */ +/* { dg-options "-Os -msse2" } */ + +#include "sse2-check.h" + +extern void abort (void); + +static void +sse2_test (void) +{ + static volatile __float128 a = 123.0q; + + if ((int) a != 123) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/pr32191.c b/gcc/testsuite/gcc.target/i386/pr32191.c index 0da5d5c5aae..f5238b01dee 100644 --- a/gcc/testsuite/gcc.target/i386/pr32191.c +++ b/gcc/testsuite/gcc.target/i386/pr32191.c @@ -1,5 +1,4 @@ /* { dg-do compile } */ -/* { dg-require-effective-target lp64 } */ /* { dg-options "-std=c99" } */ typedef _Complex float __attribute__((mode(TC))) _Complex128; diff --git a/gcc/testsuite/gcc.target/i386/pr32268.c b/gcc/testsuite/gcc.target/i386/pr32268.c index 472259c1eba..a5d673ad94f 100644 --- a/gcc/testsuite/gcc.target/i386/pr32268.c +++ b/gcc/testsuite/gcc.target/i386/pr32268.c @@ -1,5 +1,4 @@ /* { dg-do run { target *-*-linux* } } */ -/* { dg-require-effective-target lp64 } */ /* { dg-options "-O2" } */ extern void abort(void); diff --git a/gcc/testsuite/gcc.target/m68k/interrupt-2.c b/gcc/testsuite/gcc.target/m68k/interrupt-2.c new file mode 100644 index 00000000000..7d4cb68c121 --- /dev/null +++ b/gcc/testsuite/gcc.target/m68k/interrupt-2.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +int x; +volatile unsigned int y; + +#define REPEAT10(X, Y) \ + X(Y##0); X(Y##1); X(Y##2); X(Y##3); X(Y##4); \ + X(Y##5); X(Y##6); X(Y##7); X(Y##8); X(Y##9) + +#define REPEAT30(X) REPEAT10 (X, 0); REPEAT10 (X, 1); REPEAT10 (X, 2) +#define IN(X) unsigned int x##X = y +#define OUT(X) y = x##X + +void __attribute__ ((interrupt_handler)) f1 (void) +{ + x = y + 11; +} + +void __attribute__ ((interrupt_handler)) f2 (void) +{ + REPEAT30 (IN); + REPEAT30 (OUT); +} diff --git a/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c index 4c642258f7b..c12d08e0521 100644 --- a/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c +++ b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c @@ -1,15 +1,15 @@ /* { dg-do preprocess } */ /* { dg-mips-options "-mips2" } */ -#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) == defined (__mips16) +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 #error nonono #endif -#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) == defined (__mips16) +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 #error nonono #endif -#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) == defined (__mips16) +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 #error nonono #endif diff --git a/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c index 4265e4167ba..eaae7801754 100644 --- a/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c +++ b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c @@ -1,19 +1,19 @@ /* { dg-do preprocess } */ /* { dg-mips-options "-mgp64" } */ -#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) == defined (__mips16) +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 #error nonono #endif -#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) == defined (__mips16) +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 #error nonono #endif -#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) == defined (__mips16) +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 #error nonono #endif -#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) == defined (__mips16) +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 #error nonono #endif diff --git a/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-3.c b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-3.c new file mode 100644 index 00000000000..faf50fc69ca --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-3.c @@ -0,0 +1,23 @@ +/* { dg-do preprocess { target mips16_attribute } } */ +/* { dg-mips-options "-mips2 -mips16" } */ +/* { dg-add-options mips16_attribute } */ + +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 +#error nonono +#endif + +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 +#error nonono +#endif + +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 +#error nonono +#endif + +#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 +#error nonono +#endif + +#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 +#error nonono +#endif diff --git a/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-4.c b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-4.c new file mode 100644 index 00000000000..b53f4b05b61 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-4.c @@ -0,0 +1,23 @@ +/* { dg-do preprocess { target mips16_attribute } } */ +/* { dg-mips-options "-mgp64 -mips16" } */ +/* { dg-add-options mips16_attribute } */ + +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 +#error nonono +#endif + +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 +#error nonono +#endif + +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 +#error nonono +#endif + +#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 +#error nonono +#endif + +#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 +#error nonono +#endif |