summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/sh/pr21255-3.c
blob: 7edd8cb7c1ce21f0055c13c928e3cfb4709046c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile { target "sh*-*-*" } } */
/* { dg-options "-O2 -fomit-frame-pointer" } */
/* { dg-final { scan-assembler "mov #?0,r.*; mov #?20,r" } } */
/* { dg-final { scan-assembler "mov #?1077149696,r.*; mov #?0,r" } } */
double
f ()
{
  double r;

  asm ("mov %S1,%S0; mov %R1,%R0" : "=r" (r) : "i" (20));
  asm ("mov %S1,%S0; mov %R1,%R0" : "+r" (r) : "i" (20.));
  return r;
}