re PR target/81959 (PowerPC __float128 optimization fails with integer PRE_INC addresses)
[official-gcc.git] / libquadmath / math / isinfq.c
blob46996b54c3dc8dc8e94bcceb324463bafa2e11a9
1 /*
2 * Written by J.T. Conklin <jtc@netbsd.org>.
3 * Change for long double by Jakub Jelinek <jj@ultra.linux.cz>
4 * Public domain.
5 */
7 #include "quadmath-imp.h"
9 int
10 isinfq (__float128 x)
12 int64_t hx,lx;
13 GET_FLT128_WORDS64(hx,lx,x);
14 lx |= (hx & 0x7fffffffffffffffLL) ^ 0x7fff000000000000LL;
15 lx |= -lx;
16 return ~(lx >> 63) & (hx >> 62);