aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/mips/dsp-lhx.c
blob: ebfe154e8e3bf886359c0f30e8a66c639bfcc55f (plain)
1
2
3
4
5
6
7
8
9
10
11
/* Test MIPS32 DSP LHX instruction */
/* { dg-do compile } */
/* { dg-options "-mgp32 -mdsp (!HAS_LSA)" } */
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */

/* { dg-final { scan-assembler "\tlhx\t" } } */

NOMIPS16 signed short test (signed short *a, int index)
{
  return a[index];
}