MIPS32R6 and MIPS64R6 support
[official-gcc.git] / gcc / testsuite / gcc.target / mips / movcc-3.c
blob55434b72c72b585975da5d06c7ea8b234dca6b24
1 /* { dg-do compile } */
2 /* { dg-options "(HAS_MOVN) -mhard-float" } */
3 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
4 /* { dg-final { scan-assembler "\tmovt\t" } } */
5 /* { dg-final { scan-assembler "\tmovf\t" } } */
6 /* { dg-final { scan-assembler "\tmovz.s\t" } } */
7 /* { dg-final { scan-assembler "\tmovn.s\t" } } */
8 /* { dg-final { scan-assembler "\tmovt.s\t" } } */
9 /* { dg-final { scan-assembler "\tmovz.d\t" } } */
10 /* { dg-final { scan-assembler "\tmovn.d\t" } } */
11 /* { dg-final { scan-assembler "\tmovf.d\t" } } */
13 void ext_int (int);
14 void ext_long (long);
15 void ext_float (float);
16 void ext_double (double);
18 NOMIPS16 int
19 sub3 (int i, int j, float f)
21 ext_int (f ? i : j);
24 NOMIPS16 long
25 sub6 (long i, long j, float f)
27 ext_long (!f ? i : j);
30 NOMIPS16 float
31 sub7 (float f, float g, int i)
33 ext_float (i ? f : g);
36 NOMIPS16 float
37 sub8 (float f, float g, long l)
39 ext_float (!l ? f : g);
42 NOMIPS16 float
43 sub9 (float f, float g, float h)
45 ext_float (h ? f : g);
48 NOMIPS16 double
49 suba (double f, double g, int i)
51 ext_double (i ? f : g);
54 NOMIPS16 double
55 subb (double f, double g, long l)
57 ext_double (!l ? f : g);
60 NOMIPS16 double
61 subc (double f, double g, double h)
63 ext_double (!h ? f : g);