backport: dsp-lhx.c: New test.

2009-12-02  Chao-ying Fu  <fu@mips.com>

	Backport from mainline
	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: r154928
This commit is contained in:
Chao-ying Fu 2009-12-02 23:32:22 +00:00 committed by Chao-ying Fu
parent e11c2389f4
commit 01e992fb7c
3 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2009-12-02 Chao-ying Fu <fu@mips.com>
Backport from mainline
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-12-01 Jakub Jelinek <jakub@redhat.com>
PR c++/42234

View File

@ -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];
}

View File

@ -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];
}