aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/mips/asm-1.c
blob: 2408b25000958832383f5e0548e4558afc74be7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* PR target/17565.  GCC used to put the asm into the delay slot
   of the call.  */
/* { dg-do assemble } */

extern void bar (void);

NOMIPS16 int foo (int n)
{
  register int k asm ("$16") = n;
  if (k > 0)
    {
      bar ();
      asm ("li %0,0x12345678" : "=r" (k));
    }
  return k;
}