aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/mips/umips-swp-3.c
blob: f0e54647d9c22c851daef1c4bf3ec5c799d7fd9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-options "-fpeephole2 -mtune=m14k (-mmicromips)" } */
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */

void MICROMIPS
foo (int *r4, int r5, int r6)
{
  r5 *= r5;
  r4[0] = r5;
  r4[1] = r6;
  {
    register int r5asm asm ("$5") = r5;
    register int r6asm asm ("$6") = r6;
    asm ("#foo" : "=m" (r4[2]) : "d" (r5asm), "d" (r6asm));
  }
}

/* { dg-final { scan-assembler "\tswp\t\\\$5,0\\(\\\$4\\)" } }*/