diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-06 07:25:24 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-06 07:25:24 +0000 |
commit | 1e7864e44136433004d5c8adb767dddf90830cb4 (patch) | |
tree | 09b0a22654ae562c449d45f3d1fb178722c10a17 /gcc/testsuite/gcc.target | |
parent | 9306644f396b57a5977c121820ef4cf010217f71 (diff) | |
download | gcc-1e7864e44136433004d5c8adb767dddf90830cb4.tar.gz |
2008-05-06 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r134973
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@134974 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr31486.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr36064.c | 55 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr36073.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/vectorize1.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c | 4 |
6 files changed, 86 insertions, 6 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr31486.c b/gcc/testsuite/gcc.target/i386/pr31486.c new file mode 100644 index 00000000000..7082d3de98b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr31486.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-msse -mno-sse2" } */ + +typedef double __v2df __attribute__ ((vector_size (16))); + +__v2df b = { 1.1, 1.2 }; + +extern __v2df a2 (__v2df a, __v2df b); + +void test2 () +{ + b = a2 (b, b); +} diff --git a/gcc/testsuite/gcc.target/i386/pr36064.c b/gcc/testsuite/gcc.target/i386/pr36064.c new file mode 100644 index 00000000000..7964f280cff --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr36064.c @@ -0,0 +1,55 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target ilp32 } */ +/* { dg-options "-O1 -march=core2" } */ + +typedef long long ogg_int64_t; + +typedef struct vorbis_info +{ + long rate; +} vorbis_info; + +typedef struct OggVorbis_File +{ + int seekable; + int links; + ogg_int64_t *pcmlengths; + vorbis_info *vi; + int ready_state; +} OggVorbis_File; + +extern double ov_time_total (OggVorbis_File * vf, int i); +extern int ov_pcm_seek_page (OggVorbis_File * vf, ogg_int64_t pos); + +int +ov_time_seek_page (OggVorbis_File * vf, double seconds) +{ + int link = -1; + ogg_int64_t pcm_total = 0; + double time_total = 0.; + + if (vf->ready_state < 2) + return (-131); + if (!vf->seekable) + return (-138); + if (seconds < 0) + return (-131); + + for (link = 0; link < vf->links; link++) + { + double addsec = ov_time_total (vf, link); + if (seconds < time_total + addsec) + break; + time_total += addsec; + pcm_total += vf->pcmlengths[link * 2 + 1]; + } + + if (link == vf->links) + return (-131); + + { + ogg_int64_t target = + pcm_total + (seconds - time_total) * vf->vi[link].rate; + return (ov_pcm_seek_page (vf, target)); + } +} diff --git a/gcc/testsuite/gcc.target/i386/pr36073.c b/gcc/testsuite/gcc.target/i386/pr36073.c new file mode 100644 index 00000000000..b1587579e32 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr36073.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-O -march=core2 -mfpmath=sse,387 -ffast-math" } */ + +extern double log (double x); +extern int f (void); + +double cached_value; + +void g (void) +{ + cached_value = log (f ()); +} diff --git a/gcc/testsuite/gcc.target/i386/vectorize1.c b/gcc/testsuite/gcc.target/i386/vectorize1.c index bd5473fffca..7a5023aa905 100644 --- a/gcc/testsuite/gcc.target/i386/vectorize1.c +++ b/gcc/testsuite/gcc.target/i386/vectorize1.c @@ -4,14 +4,14 @@ extern char lanip[3][40]; typedef struct { - char *t[4]; + char *t[8]; }tx_typ; int set_names (void) { static tx_typ tt1; int ln; - for (ln = 0; ln < 4; ln++) + for (ln = 0; ln < 8; ln++) tt1.t[ln] = lanip[1]; } 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 72eff4da37c..4c642258f7b 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,11 +1,11 @@ /* { dg-do preprocess } */ /* { dg-mips-options "-mips2" } */ -#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 +#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) == defined (__mips16) #error nonono #endif -#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 +#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) == defined (__mips16) #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 fed2b38a57f..4265e4167ba 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,11 +1,11 @@ /* { dg-do preprocess } */ /* { dg-mips-options "-mgp64" } */ -#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 +#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) == defined (__mips16) #error nonono #endif -#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 +#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) == defined (__mips16) #error nonono #endif |