summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/fpr-moves-2.c
blob: 3f4f833ba5eda978b627fa404edad9380248ca83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-options "-mabi=32 -mhard-float -mips1 -O2 -EB" } */

NOMIPS16 void
foo (double d, double *x)
{
  *x = d;
}

NOMIPS16 double
bar (double d)
{
  register double l1 asm ("$8") = d;
  register double l2 asm ("$f20") = 0.0;
  asm ("#foo" : "=d" (l1) : "d" (l1));
  asm volatile ("#foo" :: "f" (l2));
  return l1;
}

/* { dg-final { scan-assembler "\tswc1\t\\\$f12,4\\\(\\\$6\\\)\n" } } */
/* { dg-final { scan-assembler "\tswc1\t\\\$f13,0\\\(\\\$6\\\)\n" } } */
/* { dg-final { scan-assembler "\tmfc1\t\\\$9,\\\$f12\n" } } */
/* { dg-final { scan-assembler "\tmfc1\t\\\$8,\\\$f13\n" } } */
/* { dg-final { scan-assembler "\tmtc1\t\\\$0,\\\$f20\n" } } */
/* { dg-final { scan-assembler "\tmtc1\t\\\$0,\\\$f21\n" } } */
/* { dg-final { scan-assembler "\tmtc1\t\\\$9,\\\$f0\n" } } */
/* { dg-final { scan-assembler "\tmtc1\t\\\$8,\\\$f1\n" } } */