1 /* { dg-do run { target lp64 } } */
2 /* { dg-require-effective-target p9vector_hw } */
3 /* { dg-require-effective-target float128 } */
4 /* { dg-options "-mvsx -O2" } */
5 /* { dg-additional-options "-mdejagnu-cpu=power9" { target { ! has_arch_pwr9 } } } */
7 #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
8 #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
14 extern _Float128
roundf128 (_Float128
);
15 extern _Float128
floorf128 (_Float128
);
16 extern _Float128
ceilf128 (_Float128
);
17 extern _Float128
truncf128 (_Float128
);
26 { -2.0Q
, -2.0Q
, -2.0Q
, -2.0Q
, -2.0Q
},
27 { -1.7Q
, -2.0Q
, -2.0Q
, -1.0Q
, -1.0Q
},
28 { -1.5Q
, -2.0Q
, -2.0Q
, -1.0Q
, -1.0Q
},
29 { -1.3Q
, -1.0Q
, -2.0Q
, -1.0Q
, -1.0Q
},
30 { +0.0Q
, +0.0Q
, +0.0Q
, +0.0Q
, +0.0Q
},
31 { +1.3Q
, +1.0Q
, +1.0Q
, +2.0Q
, +1.0Q
},
32 { +1.5Q
, +2.0Q
, +1.0Q
, +2.0Q
, +1.0Q
},
33 { +1.7Q
, +2.0Q
, +1.0Q
, +2.0Q
, +1.0Q
},
34 { +2.0Q
, +2.0Q
, +2.0Q
, +2.0Q
, +2.0Q
}
43 for (i
= 0; i
< sizeof (a
) / sizeof (a
[0]); i
++)
46 if (roundf128 (v
) != a
[i
].exp_round
)
49 if (floorf128 (v
) != a
[i
].exp_floor
)
52 if (ceilf128 (v
) != a
[i
].exp_ceil
)
55 if (truncf128 (v
) != a
[i
].exp_trunc
)