1 /* { dg-do run { target mipsisa64*-*-* } } */
2 /* { dg-mips-options "-mips64 -O2 -mips3d -mhard-float -mgp64" } */
4 /* Test MIPS-3D absolute compare (doubles) builtin functions */
8 int test0 (double a
, double b
);
9 int test1 (double a
, double b
);
10 int test2 (double a
, double b
);
11 int test3 (double a
, double b
);
12 int test4 (double a
, double b
);
13 int test5 (double a
, double b
);
14 int test6 (double a
, double b
);
15 int test7 (double a
, double b
);
16 int test8 (double a
, double b
);
17 int test9 (double a
, double b
);
18 int test10 (double a
, double b
);
19 int test11 (double a
, double b
);
20 int test12 (double a
, double b
);
21 int test13 (double a
, double b
);
22 int test14 (double a
, double b
);
23 int test15 (double a
, double b
);
34 if (__builtin_mips_cabs_eq_d(a
, b
) != i
)
41 if (__builtin_mips_cabs_eq_d(a
, b
) != i
)
44 /* Test all operators */
97 /* Reverse arguments */
147 #ifndef __FAST_MATH__
148 /* Test all operators */
149 a
= 1.0/0.0 - 1.0/0.0; // QNaN
150 b
= 1.0/0.0 - 1.0/0.0; // QNaN
202 printf ("Test Passes\n");
206 int test0 (double a
, double b
)
208 return __builtin_mips_cabs_f_d (a
, b
);
211 int test1 (double a
, double b
)
213 return __builtin_mips_cabs_un_d (a
, b
);
216 int test2 (double a
, double b
)
218 return __builtin_mips_cabs_eq_d (a
, b
);
221 int test3 (double a
, double b
)
223 return __builtin_mips_cabs_ueq_d (a
, b
);
226 int test4 (double a
, double b
)
228 return __builtin_mips_cabs_olt_d (a
, b
);
231 int test5 (double a
, double b
)
233 return __builtin_mips_cabs_ult_d (a
, b
);
236 int test6 (double a
, double b
)
238 return __builtin_mips_cabs_ole_d (a
, b
);
241 int test7 (double a
, double b
)
243 return __builtin_mips_cabs_ule_d (a
, b
);
246 int test8 (double a
, double b
)
248 return __builtin_mips_cabs_sf_d (a
, b
);
251 int test9 (double a
, double b
)
253 return __builtin_mips_cabs_ngle_d (a
, b
);
256 int test10 (double a
, double b
)
258 return __builtin_mips_cabs_seq_d (a
, b
);
261 int test11 (double a
, double b
)
263 return __builtin_mips_cabs_ngl_d (a
, b
);
266 int test12 (double a
, double b
)
268 return __builtin_mips_cabs_lt_d (a
, b
);
271 int test13 (double a
, double b
)
273 return __builtin_mips_cabs_nge_d (a
, b
);
276 int test14 (double a
, double b
)
278 return __builtin_mips_cabs_le_d (a
, b
);
281 int test15 (double a
, double b
)
283 return __builtin_mips_cabs_ngt_d (a
, b
);