Lines Matching +full:quad +full:- +full:precision

1 //===-lib/fp_extend.h - low precision -> high precision conversion -*- C
2 //-*-===//
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
25 // -1 accounts for the sign bit.
26 // srcBits - srcSigFracBits - 1
36 // -1 accounts for the sign bit.
37 // srcBits - srcSigFracBits - 1
50 // -1 accounts for the sign bit.
51 // -1 accounts for the explicitly stored integer bit.
52 // srcBits - srcSigFracBits - 1 - 1
65 // -1 accounts for the sign bit.
66 // srcBits - srcSigFracBits - 1
70 return __builtin_clz(a) - 16; in src_rep_t_clz_impl()
85 // -1 accounts for the sign bit.
86 // srcBits - srcSigFracBits - 1
91 #error Source should be half, single, or double precision!
92 #endif // end source precision
100 // -1 accounts for the sign bit.
101 // dstBits - dstSigFracBits - 1
110 // -1 accounts for the sign bit.
111 // dstBits - dstSigFracBits - 1
120 // -1 accounts for the sign bit.
121 // dstBits - dstSigFracBits - 1
125 #error Destination should be single, double, or quad precision!
126 #endif // end destination precision
134 const src_rep_t srcSignMask = SRC_REP_C(1) << (srcBits - 1); in extract_sign_from_src()
135 return (x & srcSignMask) >> (srcBits - 1); in extract_sign_from_src()
139 const int srcSigBits = srcBits - 1 - srcExpBits; in extract_exp_from_src()
140 const src_rep_t srcExpMask = ((SRC_REP_C(1) << srcExpBits) - 1) << srcSigBits; in extract_exp_from_src()
145 const src_rep_t srcSigFracMask = (SRC_REP_C(1) << srcSigFracBits) - 1; in extract_sig_frac_from_src()
152 return src_rep_t_clz(sigFrac) - skip; in clz_in_sig_frac()
157 return (sign << (dstBits - 1)) | (exp << (dstBits - 1 - dstExpBits)) | sigFrac; in construct_dst_rep()
161 // floating-point data as integer values follow.