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 int test0 (float a
, float b
);
9 int test1 (float a
, float b
);
10 int test2 (float a
, float b
);
11 int test3 (float a
, float b
);
12 int test4 (float a
, float b
);
13 int test5 (float a
, float b
);
14 int test6 (float a
, float b
);
15 int test7 (float a
, float b
);
16 int test8 (float a
, float b
);
17 int test9 (float a
, float b
);
18 int test10 (float a
, float b
);
19 int test11 (float a
, float b
);
20 int test12 (float a
, float b
);
21 int test13 (float a
, float b
);
22 int test14 (float a
, float b
);
23 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 int test0 (float a
, float b
)
208 return __builtin_mips_cabs_f_s (a
, b
);
211 int test1 (float a
, float b
)
213 return __builtin_mips_cabs_un_s (a
, b
);
216 int test2 (float a
, float b
)
218 return __builtin_mips_cabs_eq_s (a
, b
);
221 int test3 (float a
, float b
)
223 return __builtin_mips_cabs_ueq_s (a
, b
);
226 int test4 (float a
, float b
)
228 return __builtin_mips_cabs_olt_s (a
, b
);
231 int test5 (float a
, float b
)
233 return __builtin_mips_cabs_ult_s (a
, b
);
236 int test6 (float a
, float b
)
238 return __builtin_mips_cabs_ole_s (a
, b
);
241 int test7 (float a
, float b
)
243 return __builtin_mips_cabs_ule_s (a
, b
);
246 int test8 (float a
, float b
)
248 return __builtin_mips_cabs_sf_s (a
, b
);
251 int test9 (float a
, float b
)
253 return __builtin_mips_cabs_ngle_s (a
, b
);
256 int test10 (float a
, float b
)
258 return __builtin_mips_cabs_seq_s (a
, b
);
261 int test11 (float a
, float b
)
263 return __builtin_mips_cabs_ngl_s (a
, b
);
266 int test12 (float a
, float b
)
268 return __builtin_mips_cabs_lt_s (a
, b
);
271 int test13 (float a
, float b
)
273 return __builtin_mips_cabs_nge_s (a
, b
);
276 int test14 (float a
, float b
)
278 return __builtin_mips_cabs_le_s (a
, b
);
281 int test15 (float a
, float b
)
283 return __builtin_mips_cabs_ngt_s (a
, b
);