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
This commit is contained in:
Chao-ying Fu 2009-12-01 01:40:28 +00:00 committed by Chao-ying Fu
parent b5290908a2
commit 30093f0492
3 changed files with 25 additions and 0 deletions

View File

@ -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

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