diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-02 12:39:39 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-02 12:39:39 +0000 |
commit | 2fb581a932680f7c9031a388d83fd9461ae5aff7 (patch) | |
tree | 3fc3c7221a155722969c9d76ed30e1b1127f4ad2 /gcc/testsuite/gcc.target | |
parent | c643c550aace860f7d2ab17015f684444cb88c53 (diff) | |
download | gcc-2fb581a932680f7c9031a388d83fd9461ae5aff7.tar.gz |
2008-06-02 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r136272
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@136278 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target')
38 files changed, 467 insertions, 10 deletions
diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf522.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf522.c index 5674cab6244..205e37f3651 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf522.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf522.c @@ -18,6 +18,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf523.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf523.c index 09129e94ed2..eb21e6733e4 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf523.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf523.c @@ -18,6 +18,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf524.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf524.c index 6a58061b90e..7be63553889 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf524.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf524.c @@ -18,6 +18,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf525.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf525.c index 1be53666945..21dc2be96fb 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf525.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf525.c @@ -18,6 +18,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf526.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf526.c index bb84afe4a21..bd1197e357b 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf526.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf526.c @@ -18,6 +18,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf527.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf527.c index 50edb81eb3c..d419dd71cfa 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf527.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf527.c @@ -18,6 +18,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf531.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf531.c index efacc5a0ade..9adf99e08e1 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf531.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf531.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf532.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf532.c index 85cad2e87e9..002535a5a15 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf532.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf532.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf533.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf533.c index 9c0478ffb96..a7cf0c6efd7 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf533.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf533.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf534.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf534.c index 89c087ec5ed..cd354596d05 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf534.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf534.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf536.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf536.c index 034296b5433..0ac9ebf9a1b 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf536.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf536.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf537.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf537.c index 9f3d605a86f..66a87c045bf 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf537.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf537.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf538.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf538.c index 57c9be6f308..4baac1a0469 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf538.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf538.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf539.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf539.c index 602bd3a2d0a..756c14d1114 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf539.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf539.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf542.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf542.c index 9ea90c3e82c..f36b16370b4 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf542.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf542.c @@ -18,6 +18,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf544.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf544.c index e76c7cb94e0..d1a0045d503 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf544.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf544.c @@ -18,6 +18,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf547.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf547.c index 9418fd887bb..cdf1995c920 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf547.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf547.c @@ -18,6 +18,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf548.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf548.c index f9ed8b34e34..2689eb21596 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf548.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf548.c @@ -18,6 +18,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf549.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf549.c index 68ad9175983..01e068a3db8 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf549.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf549.c @@ -18,6 +18,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-bf561.c b/gcc/testsuite/gcc.target/bfin/mcpu-bf561.c index 3eb5d4b6ce4..e2eab3ba32a 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-bf561.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-bf561.c @@ -10,8 +10,12 @@ #error "__SILICON_REVISION__ is not 0x0005" #endif -#ifdef __WORKAROUNDS_ENABLED -#error "__WORKAROUNDS_ENABLED is defined" +#ifndef __WORKAROUNDS_ENABLED +#error "__WORKAROUNDS_ENABLED is not defined" +#endif + +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" #endif #ifdef __WORKAROUND_SPECULATIVE_LOADS diff --git a/gcc/testsuite/gcc.target/bfin/mcpu-default.c b/gcc/testsuite/gcc.target/bfin/mcpu-default.c index 5362035b440..9109701cbb8 100644 --- a/gcc/testsuite/gcc.target/bfin/mcpu-default.c +++ b/gcc/testsuite/gcc.target/bfin/mcpu-default.c @@ -2,22 +2,92 @@ /* { dg-do preprocess } */ /* { dg-bfin-options "" } */ -#ifndef __ADSPBF532__ -#error "__ADSPBF532__ is not defined" +#ifdef __ADSPBF522__ +#error "__ADSPBF522__ is defined" #endif +#ifdef __ADSPBF523__ +#error "__ADSPBF523__ is defined" +#endif +#ifdef __ADSPBF524__ +#error "__ADSPBF524__ is defined" +#endif +#ifdef __ADSPBF525__ +#error "__ADSPBF525__ is defined" +#endif +#ifdef __ADSPBF526__ +#error "__ADSPBF526__ is defined" +#endif +#ifdef __ADSPBF527__ +#error "__ADSPBF527__ is defined" +#endif + -#if __SILICON_REVISION__ != 0x0005 -#error "__SILICON_REVISION__ is not 0x0005" +#ifdef __ADSPBF531__ +#error "__ADSPBF531__ is defined" +#endif +#ifdef __ADSPBF532__ +#error "__ADSPBF532__ is defined" +#endif +#ifdef __ADSPBF533__ +#error "__ADSPBF533__ is defined" +#endif +#ifdef __ADSPBF534__ +#error "__ADSPBF534__ is defined" +#endif +#ifdef __ADSPBF536__ +#error "__ADSPBF536__ is defined" +#endif +#ifdef __ADSPBF537__ +#error "__ADSPBF537__ is defined" +#endif +#ifdef __ADSPBF538__ +#error "__ADSPBF538__ is defined" +#endif +#ifdef __ADSPBF539__ +#error "__ADSPBF539__ is defined" +#endif + +#ifdef __ADSPBF542__ +#error "__ADSPBF542__ is defined" +#endif +#ifdef __ADSPBF544__ +#error "__ADSPBF544__ is defined" +#endif +#ifdef __ADSPBF547__ +#error "__ADSPBF547__ is defined" +#endif +#ifdef __ADSPBF548__ +#error "__ADSPBF548__ is defined" +#endif +#ifdef __ADSPBF549__ +#error "__ADSPBF548__ is defined" +#endif + +#ifdef __ADSPBF561__ +#error "__ADSPBF561__ is defined" +#endif + + +#ifndef __SILICON_REVISION__ +#error "__SILICON_REVISION__ is not defined" +#else +#if __SILICON_REVISION__ != 0xffff +#error "__SILICON_REVISION__ is not 0xFFFF" +#endif #endif #ifndef __WORKAROUNDS_ENABLED #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif -#ifdef __WORKAROUND_SPECULATIVE_SYNCS -#error "__WORKAROUND_SPECULATIVE_SYNCS is defined" +#ifndef __WORKAROUND_SPECULATIVE_SYNCS +#error "__WORKAROUND_SPECULATIVE_SYNCS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/workarounds-1.c b/gcc/testsuite/gcc.target/bfin/workarounds-1.c index cf9a8779480..53ca1d7b7e5 100644 --- a/gcc/testsuite/gcc.target/bfin/workarounds-1.c +++ b/gcc/testsuite/gcc.target/bfin/workarounds-1.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/workarounds-2.c b/gcc/testsuite/gcc.target/bfin/workarounds-2.c index b00a6884cdc..c639a204e86 100644 --- a/gcc/testsuite/gcc.target/bfin/workarounds-2.c +++ b/gcc/testsuite/gcc.target/bfin/workarounds-2.c @@ -10,8 +10,12 @@ #error "__SILICON_REVISION__ is not 0x0003" #endif -#ifdef __WORKAROUNDS_ENABLED -#error "__WORKAROUNDS_ENABLED is defined" +#ifndef __WORKAROUNDS_ENABLED +#error "__WORKAROUNDS_ENABLED is not defined" +#endif + +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" #endif #ifdef __WORKAROUND_SPECULATIVE_LOADS diff --git a/gcc/testsuite/gcc.target/bfin/workarounds-3.c b/gcc/testsuite/gcc.target/bfin/workarounds-3.c index d9781bae2fd..3209f234891 100644 --- a/gcc/testsuite/gcc.target/bfin/workarounds-3.c +++ b/gcc/testsuite/gcc.target/bfin/workarounds-3.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is defined" #endif +#ifdef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is defined" +#endif + #ifdef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/workarounds-4.c b/gcc/testsuite/gcc.target/bfin/workarounds-4.c index 50cec9ca7e4..62bd382b7cb 100644 --- a/gcc/testsuite/gcc.target/bfin/workarounds-4.c +++ b/gcc/testsuite/gcc.target/bfin/workarounds-4.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/workarounds-any.c b/gcc/testsuite/gcc.target/bfin/workarounds-any.c index 50cec9ca7e4..62bd382b7cb 100644 --- a/gcc/testsuite/gcc.target/bfin/workarounds-any.c +++ b/gcc/testsuite/gcc.target/bfin/workarounds-any.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is not defined" #endif +#ifndef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is not defined" +#endif + #ifndef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is not defined" #endif diff --git a/gcc/testsuite/gcc.target/bfin/workarounds-none.c b/gcc/testsuite/gcc.target/bfin/workarounds-none.c index d9781bae2fd..3209f234891 100644 --- a/gcc/testsuite/gcc.target/bfin/workarounds-none.c +++ b/gcc/testsuite/gcc.target/bfin/workarounds-none.c @@ -14,6 +14,10 @@ #error "__WORKAROUNDS_ENABLED is defined" #endif +#ifdef __WORKAROUND_RETS +#error "__WORKAROUND_RETS is defined" +#endif + #ifdef __WORKAROUND_SPECULATIVE_LOADS #error "__WORKAROUND_SPECULATIVE_LOADS is defined" #endif diff --git a/gcc/testsuite/gcc.target/i386/pr35767-1.c b/gcc/testsuite/gcc.target/i386/pr35767-1.c new file mode 100644 index 00000000000..5ed5b858866 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr35767-1.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -msse2" } */ + +#include "sse2-check.h" + +typedef struct { __m128 f __attribute__((packed)); } packed; + +__m128 __attribute__((noinline)) +foo (__m128 a1, __m128 a2, __m128 a3, __m128 a4, + __m128 a5, __m128 a6, __m128 a7, __m128 a8, + int b1, int b2, int b3, int b4, int b5, int b6, int b7, packed y) +{ + return y.f; +} + +void +sse2_test (void) +{ + packed x; + __m128 y = { 0 }; + x.f = y; + y = foo (y, y, y, y, y, y, y, y, 1, 2, 3, 4, 5, 6, -1, x); + if (__builtin_memcmp (&y, &x.f, sizeof (y)) != 0) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/pr35767-1d.c b/gcc/testsuite/gcc.target/i386/pr35767-1d.c new file mode 100644 index 00000000000..cdf17fa61b3 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr35767-1d.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -msse2" } */ + +#include "sse2-check.h" + +typedef struct { __m128d f __attribute__((packed)); } packed; + +__m128d __attribute__((noinline)) +foo (__m128d a1, __m128d a2, __m128d a3, __m128d a4, + __m128d a5, __m128d a6, __m128d a7, __m128d a8, + int b1, int b2, int b3, int b4, int b5, int b6, int b7, packed y) +{ + return y.f; +} + +void +sse2_test (void) +{ + packed x; + __m128d y = { 0 }; + x.f = y; + y = foo (y, y, y, y, y, y, y, y, 1, 2, 3, 4, 5, 6, -1, x); + if (__builtin_memcmp (&y, &x.f, sizeof (y)) != 0) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/pr35767-1i.c b/gcc/testsuite/gcc.target/i386/pr35767-1i.c new file mode 100644 index 00000000000..188e8e737bd --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr35767-1i.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -msse2" } */ + +#include "sse2-check.h" + +typedef struct { __m128i f __attribute__((packed)); } packed; + +__m128i __attribute__((noinline)) +foo (__m128i a1, __m128i a2, __m128i a3, __m128i a4, + __m128i a5, __m128i a6, __m128i a7, __m128i a8, + int b1, int b2, int b3, int b4, int b5, int b6, int b7, packed y) +{ + return y.f; +} + +void +sse2_test (void) +{ + packed x; + __m128i y = { 0 }; + x.f = y; + y = foo (y, y, y, y, y, y, y, y, 1, 2, 3, 4, 5, 6, -1, x); + if (__builtin_memcmp (&y, &x.f, sizeof (y)) != 0) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/pr35767-2.c b/gcc/testsuite/gcc.target/i386/pr35767-2.c new file mode 100644 index 00000000000..82062ff9ee7 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr35767-2.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -msse2" } */ + +#include "sse2-check.h" + +typedef __m128 __attribute__((aligned(1))) unaligned; + +__m128 __attribute__((noinline)) +foo (__m128 a1, __m128 a2, __m128 a3, __m128 a4, + __m128 a5, __m128 a6, __m128 a7, __m128 a8, + int b1, int b2, int b3, int b4, int b5, int b6, int b7, unaligned y) +{ + return y; +} + +void +sse2_test (void) +{ + unaligned x; + __m128 y = { 0 }; + x = y; + y = foo (y, y, y, y, y, y, y, y, 1, 2, 3, 4, 5, 6, -1, x); + if (__builtin_memcmp (&y, &x, sizeof (y)) != 0) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/pr35767-2d.c b/gcc/testsuite/gcc.target/i386/pr35767-2d.c new file mode 100644 index 00000000000..ae96cd852d0 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr35767-2d.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -msse2" } */ + +#include "sse2-check.h" + +typedef __m128d __attribute__((aligned(1))) unaligned; + +__m128d __attribute__((noinline)) +foo (__m128d a1, __m128d a2, __m128d a3, __m128d a4, + __m128d a5, __m128d a6, __m128d a7, __m128d a8, + int b1, int b2, int b3, int b4, int b5, int b6, int b7, unaligned y) +{ + return y; +} + +void +sse2_test (void) +{ + unaligned x; + __m128d y = { 0 }; + x = y; + y = foo (y, y, y, y, y, y, y, y, 1, 2, 3, 4, 5, 6, -1, x); + if (__builtin_memcmp (&y, &x, sizeof (y)) != 0) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/pr35767-2i.c b/gcc/testsuite/gcc.target/i386/pr35767-2i.c new file mode 100644 index 00000000000..d241644b62b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr35767-2i.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-O2 -msse2" } */ + +#include "sse2-check.h" + +typedef __m128i __attribute__((aligned(1))) unaligned; + +__m128i __attribute__((noinline)) +foo (__m128i a1, __m128i a2, __m128i a3, __m128i a4, + __m128i a5, __m128i a6, __m128i a7, __m128i a8, + int b1, int b2, int b3, int b4, int b5, int b6, int b7, unaligned y) +{ + return y; +} + +void +sse2_test (void) +{ + unaligned x; + __m128i y = { 0 }; + x = y; + y = foo (y, y, y, y, y, y, y, y, 1, 2, 3, 4, 5, 6, -1, x); + if (__builtin_memcmp (&y, &x, sizeof (y)) != 0) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/pr35767-3.c b/gcc/testsuite/gcc.target/i386/pr35767-3.c new file mode 100644 index 00000000000..e7592ff7bcb --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr35767-3.c @@ -0,0 +1,26 @@ +/* { dg-do run } */ +/* { dg-require-effective-target dfp } */ +/* { dg-options "-O -msse2 -std=gnu99" } */ + +#include "sse2-check.h" + +typedef _Decimal128 unaligned __attribute__((aligned(1))); + +_Decimal128 __attribute__((noinline)) +foo (_Decimal128 a1, _Decimal128 a2, _Decimal128 a3, _Decimal128 a4, + _Decimal128 a5, _Decimal128 a6, _Decimal128 a7, _Decimal128 a8, + int b1, int b2, int b3, int b4, int b5, int b6, int b7, unaligned y) +{ + return y; +} + +void +sse2_test (void) +{ + unaligned x; + _Decimal128 y = -1; + x = y; + y = foo (0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, -1, x); + if (__builtin_memcmp (&y, &x, sizeof (y))) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/pr35767-4.c b/gcc/testsuite/gcc.target/i386/pr35767-4.c new file mode 100644 index 00000000000..e12f64ffe98 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr35767-4.c @@ -0,0 +1,14 @@ +/* Test that we generate aligned load when memory is aligned. */ +/* { dg-do compile } */ +/* { 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" } } */ + +extern _Decimal128 foo (_Decimal128, _Decimal128, _Decimal128); + +void +bar (void) +{ + foo (0, 0, 0); +} diff --git a/gcc/testsuite/gcc.target/i386/pr35767-5.c b/gcc/testsuite/gcc.target/i386/pr35767-5.c new file mode 100644 index 00000000000..4372d2e5746 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr35767-5.c @@ -0,0 +1,17 @@ +/* Test that we generate aligned load when memory is aligned. */ +/* { dg-do compile } */ +/* { dg-options "-O -msse2 -mtune=generic" } */ +/* { dg-final { scan-assembler-not "movups" } } */ +/* { dg-final { scan-assembler "movaps" } } */ + +typedef float v4sf __attribute__ ((__vector_size__ (16))); + +extern void foo(v4sf, v4sf, v4sf, v4sf, v4sf, v4sf, v4sf, v4sf, v4sf); + +int test(void) +{ + v4sf x = { 0.0, 1.0, 2.0, 3.0 }; + + foo (x, x, x, x, x, x, x, x, x); + return 0; +} diff --git a/gcc/testsuite/gcc.target/mips/fpr-moves-7.c b/gcc/testsuite/gcc.target/mips/fpr-moves-7.c new file mode 100644 index 00000000000..4736edd24ee --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/fpr-moves-7.c @@ -0,0 +1,38 @@ +/* { dg-do compile { target mips16_attribute } } */ +/* { dg-mips-options "-mabi=64 -msoft-float -O2 -EL" } */ +/* { dg-add-options mips16_attribute } */ + +extern long double g[16]; +extern unsigned char gstuff[0x10000]; + +NOMIPS16 long double +foo (long double i1, long double i2, long double i3, long double i4, + long double *x, unsigned char *lstuff) +{ + g[0] = i1; + g[1] = i2; + g[2] = i3; + g[3] = i4; + x[0] = x[4]; + x[1] = 0; + x[2] = 1.0; + x[3] = g[4]; + x[4] = *(long double *) (lstuff + 0x7fff); + return *(long double *) (gstuff + 0x7fff); +} + +MIPS16 long double +bar (long double i1, long double i2, long double i3, long double i4, + long double *x, unsigned char *lstuff) +{ + g[0] = i1; + g[1] = i2; + g[2] = i3; + g[3] = i4; + x[0] = x[4]; + x[1] = 0; + x[2] = 1.0; + x[3] = g[4]; + x[4] = *(long double *) (lstuff + 0x7fff); + return *(long double *) (gstuff + 0x7fff); +} diff --git a/gcc/testsuite/gcc.target/mips/fpr-moves-8.c b/gcc/testsuite/gcc.target/mips/fpr-moves-8.c new file mode 100644 index 00000000000..ade9e5e9c0a --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/fpr-moves-8.c @@ -0,0 +1,38 @@ +/* { dg-do compile { target mips16_attribute } } */ +/* { dg-mips-options "-mabi=64 -msoft-float -O2 -EB" } */ +/* { dg-add-options mips16_attribute } */ + +extern long double g[16]; +extern unsigned char gstuff[0x10000]; + +NOMIPS16 long double +foo (long double i1, long double i2, long double i3, long double i4, + long double *x, unsigned char *lstuff) +{ + g[0] = i1; + g[1] = i2; + g[2] = i3; + g[3] = i4; + x[0] = x[4]; + x[1] = 0; + x[2] = 1.0; + x[3] = g[4]; + x[4] = *(long double *) (lstuff + 0x7fff); + return *(long double *) (gstuff + 0x7fff); +} + +MIPS16 long double +bar (long double i1, long double i2, long double i3, long double i4, + long double *x, unsigned char *lstuff) +{ + g[0] = i1; + g[1] = i2; + g[2] = i3; + g[3] = i4; + x[0] = x[4]; + x[1] = 0; + x[2] = 1.0; + x[3] = g[4]; + x[4] = *(long double *) (lstuff + 0x7fff); + return *(long double *) (gstuff + 0x7fff); +} |