diff options
author | Chao-ying Fu <fu@mips.com> | 2009-12-01 01:40:28 +0000 |
---|---|---|
committer | Chao-ying Fu <chaoyingfu@gcc.gnu.org> | 2009-12-01 01:40:28 +0000 |
commit | 30093f0492dcf588c2225831365f170e3ee77816 (patch) | |
tree | a4816559d24821653a41d2b5c2872304894a6c19 /gcc | |
parent | b5290908a22419a98a419535d5d27f904d10c9aa (diff) | |
download | gcc-30093f0492dcf588c2225831365f170e3ee77816.zip gcc-30093f0492dcf588c2225831365f170e3ee77816.tar.gz gcc-30093f0492dcf588c2225831365f170e3ee77816.tar.bz2 |
dsp-lhx.c: New test.
2009-11-30 Chao-ying Fu <fu@mips.com>
* gcc.target/mips/dsp-lhx.c: New test.
* gcc.target/mips/dsp-no-lhx.c: New test.
From-SVN: r154862
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/dsp-lhx.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/dsp-no-lhx.c | 10 |
3 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e97ca5a..382406f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-11-30 Chao-ying Fu <fu@mips.com> + + * gcc.target/mips/dsp-lhx.c: New test. + * gcc.target/mips/dsp-no-lhx.c: New test. + 2009-11-30 Dave Korn <dave.korn.cygwin@gmail.com> * lib/g++.exp (g++_init): Add host-dependent settings for diff --git a/gcc/testsuite/gcc.target/mips/dsp-lhx.c b/gcc/testsuite/gcc.target/mips/dsp-lhx.c new file mode 100644 index 0000000..416356f --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/dsp-lhx.c @@ -0,0 +1,10 @@ +/* Test MIPS32 DSP LHX instruction */ +/* { dg-do compile } */ +/* { dg-options "-mgp32 -mdsp -O2" } */ + +/* { dg-final { scan-assembler "\tlhx\t" } } */ + +NOMIPS16 signed short test (signed short *a, int index) +{ + return a[index]; +} diff --git a/gcc/testsuite/gcc.target/mips/dsp-no-lhx.c b/gcc/testsuite/gcc.target/mips/dsp-no-lhx.c new file mode 100644 index 0000000..a37c42f --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/dsp-no-lhx.c @@ -0,0 +1,10 @@ +/* Test MIPS32 DSP LHX instruction */ +/* { dg-do compile } */ +/* { dg-options "-mgp32 -mdsp -O2" } */ + +/* { dg-final { scan-assembler-not "\tlhx\t" } } */ + +NOMIPS16 unsigned short test (unsigned short *a, int index) +{ + return a[index]; +} |