* gcc.target/mips/dsp-lhx.c: New test.
* gcc.target/mips/dsp-no-lhx.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154862
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
--- /dev/null
+/* 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];
+}
--- /dev/null
+/* 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];
+}