1 /* { dg-do run { target mipsisa64*-*-* } } */
2 /* { dg-mips-options "-mips64 -O2 -mips3d -mhard-float -mgp64" } */
4 /* Test MIPS-3D absolute compare (floats) builtin functions */
8 NOMIPS16
int test0 (float a
, float b
);
9 NOMIPS16
int test1 (float a
, float b
);
10 NOMIPS16
int test2 (float a
, float b
);
11 NOMIPS16
int test3 (float a
, float b
);
12 NOMIPS16
int test4 (float a
, float b
);
13 NOMIPS16
int test5 (float a
, float b
);
14 NOMIPS16
int test6 (float a
, float b
);
15 NOMIPS16
int test7 (float a
, float b
);
16 NOMIPS16
int test8 (float a
, float b
);
17 NOMIPS16
int test9 (float a
, float b
);
18 NOMIPS16
int test10 (float a
, float b
);
19 NOMIPS16
int test11 (float a
, float b
);
20 NOMIPS16
int test12 (float a
, float b
);
21 NOMIPS16
int test13 (float a
, float b
);
22 NOMIPS16
int test14 (float a
, float b
);
23 NOMIPS16
int test15 (float a
, float b
);
34 if (__builtin_mips_cabs_eq_s(a
, b
) != i
)
41 if (__builtin_mips_cabs_eq_s(a
, b
) != i
)
44 /* Test all comparisons */
97 /* Reversed arguments */
147 #ifndef __FAST_MATH__
148 /* Test all comparisons */
149 a
= 1.0f
/0.0f
- 1.0f
/0.0f
; // QNaN
202 printf ("Test Passes\n");
206 NOMIPS16
int test0 (float a
, float b
)
208 return __builtin_mips_cabs_f_s (a
, b
);
211 NOMIPS16
int test1 (float a
, float b
)
213 return __builtin_mips_cabs_un_s (a
, b
);
216 NOMIPS16
int test2 (float a
, float b
)
218 return __builtin_mips_cabs_eq_s (a
, b
);
221 NOMIPS16
int test3 (float a
, float b
)
223 return __builtin_mips_cabs_ueq_s (a
, b
);
226 NOMIPS16
int test4 (float a
, float b
)
228 return __builtin_mips_cabs_olt_s (a
, b
);
231 NOMIPS16
int test5 (float a
, float b
)
233 return __builtin_mips_cabs_ult_s (a
, b
);
236 NOMIPS16
int test6 (float a
, float b
)
238 return __builtin_mips_cabs_ole_s (a
, b
);
241 NOMIPS16
int test7 (float a
, float b
)
243 return __builtin_mips_cabs_ule_s (a
, b
);
246 NOMIPS16
int test8 (float a
, float b
)
248 return __builtin_mips_cabs_sf_s (a
, b
);
251 NOMIPS16
int test9 (float a
, float b
)
253 return __builtin_mips_cabs_ngle_s (a
, b
);
256 NOMIPS16
int test10 (float a
, float b
)
258 return __builtin_mips_cabs_seq_s (a
, b
);
261 NOMIPS16
int test11 (float a
, float b
)
263 return __builtin_mips_cabs_ngl_s (a
, b
);
266 NOMIPS16
int test12 (float a
, float b
)
268 return __builtin_mips_cabs_lt_s (a
, b
);
271 NOMIPS16
int test13 (float a
, float b
)
273 return __builtin_mips_cabs_nge_s (a
, b
);
276 NOMIPS16
int test14 (float a
, float b
)
278 return __builtin_mips_cabs_le_s (a
, b
);
281 NOMIPS16
int test15 (float a
, float b
)
283 return __builtin_mips_cabs_ngt_s (a
, b
);