OSDN Git Service

Index: gcc/ChangeLog
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / mips-movcc-3.c
1 /* { dg-do compile { target "mips*-*-*" } } */
2 /* { dg-options "-O2 -mips4" } */
3 /* { dg-final { scan-assembler "movz.s" } } */
4 /* { dg-final { scan-assembler "movn.s" } } */
5 /* { dg-final { scan-assembler "movt.s" } } */
6 /* { dg-final { scan-assembler "movz.d" } } */
7 /* { dg-final { scan-assembler "movn.d" } } */
8 /* { dg-final { scan-assembler "movf.d" } } */
9
10 #if __mips < 4 || __mips_soft_float
11 asm ("# movz.s movn.s movt.s movz.d movn.d movf.d");
12 #else
13 void ext_float (float);
14 void ext_double (double);
15
16 float
17 sub7 (float f, float g, int i)
18 {
19   ext_float (i ? f : g);
20 }
21
22 float
23 sub8 (float f, float g, long l)
24 {
25   ext_float (!l ? f : g);
26 }
27
28 float
29 sub9 (float f, float g, float h)
30 {
31   ext_float (h ? f : g);
32 }
33
34 double
35 suba (double f, double g, int i)
36 {
37   ext_double (i ? f : g);
38 }
39
40 double
41 subb (double f, double g, long l)
42 {
43   ext_double (!l ? f : g);
44 }
45
46 double
47 subc (double f, double g, double h)
48 {
49   ext_double (!h ? f : g);
50 }
51 #endif