summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/sh/pr21255-1.c
blob: 5d5b6d7f9a684c2ff9786997ebddeea31e1b476d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile { target "sh*-*-*" } } */
/* { dg-options "-O2 -fomit-frame-pointer" } */
/* { dg-final { scan-assembler "mov fr4,fr.; mov fr5,fr." { target sh-*-* } } } */
/* { dg-final { scan-assembler "mov fr4,fr.; mov fr5,fr." { target sh[1234lb]*-*-* } } } */
/* { dg-final { scan-assembler "mov fr0,fr.; mov fr1,fr." { target sh[56]*-*-* } } } */
double
f (double d)
{
  double r;

#if defined (__SH_FPU_DOUBLE__)
  asm ("mov %S1,%S0; mov %R1,%R0" : "=f" (r) : "f" (d));
#else
  asm ("mov fr4,fr4; mov fr5,fr5");
#endif
  return r;
}