Debian Codegraph @

common/bid_conf.h

raw
1 /******************************************************************************
2 Copyright (c) 2007-2011, Intel Corp.
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7
8 * Redistributions of source code must retain the above copyright notice,
9 this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright
11 notice, this list of conditions and the following disclaimer in the
12 documentation and/or other materials provided with the distribution.
13 * Neither the name of Intel Corporation nor the names of its contributors
14 may be used to endorse or promote products derived from this software
15 without specific prior written permission.
16
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 THE POSSIBILITY OF SUCH DAMAGE.
28 ******************************************************************************/
29
30 #if defined(__cplusplus)
31 #define BID_EXTERN_C extern "C"
32 #else
33 #define BID_EXTERN_C extern
34 #endif
35
36 #ifndef _BID_CONF_H
37 #define _BID_CONF_H
38
39 // Name Changes
40
41 #define _IDEC_glbflags __bid_IDEC_glbflags
42 #define _IDEC_glbround __bid_IDEC_glbround
43 #define _IDEC_glbexcepthandling __bid_IDEC_glbexcepthandling
44 #define _IDEC_glbexceptionmasks __bid_IDEC_glbexceptionmasks
45
46 #define bid32_inf __bid32_inf
47 #define bid64_inf __bid64_inf
48 #define bid128_inf __bid128_inf
49 #define bid32_exp __bid32_exp
50 #define bid32_log __bid32_log
51 #define bid32_pow __bid32_pow
52 #define bid64_exp __bid64_exp
53 #define bid64_log __bid64_log
54 #define bid64_pow __bid64_pow
55 #define bid128_exp __bid128_exp
56 #define bid128_log __bid128_log
57 #define bid128_pow __bid128_pow
58 #define bid32_cbrt __bid32_cbrt
59 #define bid64_cbrt __bid64_cbrt
60 #define bid128_cbrt __bid128_cbrt
61 #define bid32_atan2 __bid32_atan2
62 #define bid64_atan2 __bid64_atan2
63 #define bid128_atan2 __bid128_atan2
64 #define bid32_fmod __bid32_fmod
65 #define bid64_fmod __bid64_fmod
66 #define bid128_fmod __bid128_fmod
67 #define bid32_modf __bid32_modf
68 #define bid64_modf __bid64_modf
69 #define bid128_modf __bid128_modf
70 #define bid32_hypot __bid32_hypot
71 #define bid64_hypot __bid64_hypot
72 #define bid128_hypot __bid128_hypot
73 #define bid32_sin __bid32_sin
74 #define bid64_sin __bid64_sin
75 #define bid128_sin __bid128_sin
76 #define bid32_cos __bid32_cos
77 #define bid64_cos __bid64_cos
78 #define bid128_cos __bid128_cos
79 #define bid32_tan __bid32_tan
80 #define bid64_tan __bid64_tan
81 #define bid128_tan __bid128_tan
82 #define bid32_asin __bid32_asin
83 #define bid64_asin __bid64_asin
84 #define bid128_asin __bid128_asin
85 #define bid32_acos __bid32_acos
86 #define bid64_acos __bid64_acos
87 #define bid128_acos __bid128_acos
88 #define bid32_atan __bid32_atan
89 #define bid64_atan __bid64_atan
90 #define bid128_atan __bid128_atan
91 #define bid32_sinh __bid32_sinh
92 #define bid64_sinh __bid64_sinh
93 #define bid128_sinh __bid128_sinh
94 #define bid32_cosh __bid32_cosh
95 #define bid64_cosh __bid64_cosh
96 #define bid128_cosh __bid128_cosh
97 #define bid32_tanh __bid32_tanh
98 #define bid64_tanh __bid64_tanh
99 #define bid128_tanh __bid128_tanh
100 #define bid32_asinh __bid32_asinh
101 #define bid64_asinh __bid64_asinh
102 #define bid128_asinh __bid128_asinh
103 #define bid32_acosh __bid32_acosh
104 #define bid64_acosh __bid64_acosh
105 #define bid128_acosh __bid128_acosh
106 #define bid32_atanh __bid32_atanh
107 #define bid64_atanh __bid64_atanh
108 #define bid128_atanh __bid128_atanh
109 #define bid32_log1p __bid32_log1p
110 #define bid64_log1p __bid64_log1p
111 #define bid128_log1p __bid128_log1p
112 #define bid32_exp2 __bid32_exp2
113 #define bid64_exp2 __bid64_exp2
114 #define bid128_exp2 __bid128_exp2
115 #define bid32_exp10 __bid32_exp10
116 #define bid64_exp10 __bid64_exp10
117 #define bid128_exp10 __bid128_exp10
118 #define bid32_expm1 __bid32_expm1
119 #define bid64_expm1 __bid64_expm1
120 #define bid128_expm1 __bid128_expm1
121 #define bid32_log10 __bid32_log10
122 #define bid64_log10 __bid64_log10
123 #define bid128_log10 __bid128_log10
124 #define bid32_log2 __bid32_log2
125 #define bid64_log2 __bid64_log2
126 #define bid128_log2 __bid128_log2
127 #define bid32_erf __bid32_erf
128 #define bid64_erf __bid64_erf
129 #define bid128_erf __bid128_erf
130 #define bid32_erfc __bid32_erfc
131 #define bid64_erfc __bid64_erfc
132 #define bid128_erfc __bid128_erfc
133 #define bid32_tgamma __bid32_tgamma
134 #define bid64_tgamma __bid64_tgamma
135 #define bid128_tgamma __bid128_tgamma
136 #define bid32_lgamma __bid32_lgamma
137 #define bid64_lgamma __bid64_lgamma
138 #define bid128_lgamma __bid128_lgamma
139
140 #define bid32_frexp __bid32_frexp
141 #define bid64_frexp __bid64_frexp
142 #define bid128_frexp __bid128_frexp
143 #define bid32_logb __bid32_logb
144 #define bid64_logb __bid64_logb
145 #define bid128_logb __bid128_logb
146 #define bid32_scalbln __bid32_scalbln
147 #define bid64_scalbln __bid64_scalbln
148 #define bid128_scalbln __bid128_scalbln
149 #define bid32_nearbyint __bid32_nearbyint
150 #define bid64_nearbyint __bid64_nearbyint
151 #define bid128_nearbyint __bid128_nearbyint
152 #define bid32_lrint __bid32_lrint
153 #define bid64_lrint __bid64_lrint
154 #define bid128_lrint __bid128_lrint
155 #define bid32_llrint __bid32_llrint
156 #define bid64_llrint __bid64_llrint
157 #define bid128_llrint __bid128_llrint
158 #define bid32_lround __bid32_lround
159 #define bid64_lround __bid64_lround
160 #define bid128_lround __bid128_lround
161 #define bid32_llround __bid32_llround
162 #define bid64_llround __bid64_llround
163 #define bid128_llround __bid128_llround
164 #define bid32_nan __bid32_nan
165 #define bid64_nan __bid64_nan
166 #define bid128_nan __bid128_nan
167 #define bid32_nexttoward __bid32_nexttoward
168 #define bid64_nexttoward __bid64_nexttoward
169 #define bid128_nexttoward __bid128_nexttoward
170 #define bid32_fdim __bid32_fdim
171 #define bid64_fdim __bid64_fdim
172 #define bid128_fdim __bid128_fdim
173 #define bid32_quantexp __bid32_quantexp
174 #define bid64_quantexp __bid64_quantexp
175 #define bid128_quantexp __bid128_quantexp
176
177 #define bid32_add __bid32_add
178 #define bid32_sub __bid32_sub
179 #define bid32_mul __bid32_mul
180 #define bid32_div __bid32_div
181 #define bid32_fma __bid32_fma
182 #define bid32_sqrt __bid32_sqrt
183 #define bid32_rem __bid32_rem
184 #define bid32_ilogb __bid32_ilogb
185 #define bid32_scalbn __bid32_scalbn
186 #define bid32_ldexp __bid32_ldexp
187 #define bid32_to_string __bid32_to_string
188 #define bid32_from_string __bid32_from_string
189 #define bid32_quantize __bid32_quantize
190 #define bid32_nextup __bid32_nextup
191 #define bid32_nextdown __bid32_nextdown
192 #define bid32_minnum __bid32_minnum
193 #define bid32_minnum_mag __bid32_minnum_mag
194 #define bid32_maxnum __bid32_maxnum
195 #define bid32_maxnum_mag __bid32_maxnum_mag
196 #define bid32_from_int32 __bid32_from_int32
197 #define bid32_from_uint32 __bid32_from_uint32
198 #define bid32_from_int64 __bid32_from_int64
199 #define bid32_from_uint64 __bid32_from_uint64
200 #define bid32_isSigned __bid32_isSigned
201 #define bid32_isNormal __bid32_isNormal
202 #define bid32_isSubnormal __bid32_isSubnormal
203 #define bid32_isFinite __bid32_isFinite
204 #define bid32_isZero __bid32_isZero
205 #define bid32_isInf __bid32_isInf
206 #define bid32_isSignaling __bid32_isSignaling
207 #define bid32_isNaN __bid32_isNaN
208 #define bid32_copy __bid32_copy
209 #define bid32_negate __bid32_negate
210 #define bid32_abs __bid32_abs
211 #define bid32_copySign __bid32_copySign
212 #define bid32_class __bid32_class
213 #define bid32_sameQuantum __bid32_sameQuantum
214 #define bid32_totalOrder __bid32_totalOrder
215 #define bid32_totalOrderMag __bid32_totalOrderMag
216 #define bid32_radix __bid32_radix
217 #define bid32_quiet_equal __bid32_quiet_equal
218 #define bid32_quiet_greater __bid32_quiet_greater
219 #define bid32_quiet_greater_equal __bid32_quiet_greater_equal
220 #define bid32_quiet_greater_unordered __bid32_quiet_greater_unordered
221 #define bid32_quiet_less __bid32_quiet_less
222 #define bid32_quiet_less_equal __bid32_quiet_less_equal
223 #define bid32_quiet_less_unordered __bid32_quiet_less_unordered
224 #define bid32_quiet_not_equal __bid32_quiet_not_equal
225 #define bid32_quiet_not_greater __bid32_quiet_not_greater
226 #define bid32_quiet_not_less __bid32_quiet_not_less
227 #define bid32_quiet_ordered __bid32_quiet_ordered
228 #define bid32_quiet_unordered __bid32_quiet_unordered
229 #define bid32_signaling_greater __bid32_signaling_greater
230 #define bid32_signaling_greater_equal __bid32_signaling_greater_equal
231 #define bid32_signaling_greater_unordered __bid32_signaling_greater_unordered
232 #define bid32_signaling_less __bid32_signaling_less
233 #define bid32_signaling_less_equal __bid32_signaling_less_equal
234 #define bid32_signaling_less_unordered __bid32_signaling_less_unordered
235 #define bid32_signaling_not_greater __bid32_signaling_not_greater
236 #define bid32_signaling_not_less __bid32_signaling_not_less
237 #define bid32_isCanonical __bid32_isCanonical
238 #define bid32_nextafter __bid32_nextafter
239 #define bid32_round_integral_exact __bid32_round_integral_exact
240 #define bid32_round_integral_nearest_away __bid32_round_integral_nearest_away
241 #define bid32_round_integral_nearest_even __bid32_round_integral_nearest_even
242 #define bid32_round_integral_negative __bid32_round_integral_negative
243 #define bid32_round_integral_positive __bid32_round_integral_positive
244 #define bid32_round_integral_zero __bid32_round_integral_zero
245 #define bid32_to_int16_ceil __bid32_to_int16_ceil
246 #define bid32_to_int16_floor __bid32_to_int16_floor
247 #define bid32_to_int16_int __bid32_to_int16_int
248 #define bid32_to_int16_rnint __bid32_to_int16_rnint
249 #define bid32_to_int16_rninta __bid32_to_int16_rninta
250 #define bid32_to_int16_xceil __bid32_to_int16_xceil
251 #define bid32_to_int16_xfloor __bid32_to_int16_xfloor
252 #define bid32_to_int16_xint __bid32_to_int16_xint
253 #define bid32_to_int16_xrnint __bid32_to_int16_xrnint
254 #define bid32_to_int16_xrninta __bid32_to_int16_xrninta
255 #define bid32_to_int32_ceil __bid32_to_int32_ceil
256 #define bid32_to_int32_floor __bid32_to_int32_floor
257 #define bid32_to_int32_int __bid32_to_int32_int
258 #define bid32_to_int32_rnint __bid32_to_int32_rnint
259 #define bid32_to_int32_rninta __bid32_to_int32_rninta
260 #define bid32_to_int32_xceil __bid32_to_int32_xceil
261 #define bid32_to_int32_xfloor __bid32_to_int32_xfloor
262 #define bid32_to_int32_xint __bid32_to_int32_xint
263 #define bid32_to_int32_xrnint __bid32_to_int32_xrnint
264 #define bid32_to_int32_xrninta __bid32_to_int32_xrninta
265 #define bid32_to_int64_ceil __bid32_to_int64_ceil
266 #define bid32_to_int64_floor __bid32_to_int64_floor
267 #define bid32_to_int64_int __bid32_to_int64_int
268 #define bid32_to_int64_rnint __bid32_to_int64_rnint
269 #define bid32_to_int64_rninta __bid32_to_int64_rninta
270 #define bid32_to_int64_xceil __bid32_to_int64_xceil
271 #define bid32_to_int64_xfloor __bid32_to_int64_xfloor
272 #define bid32_to_int64_xint __bid32_to_int64_xint
273 #define bid32_to_int64_xrnint __bid32_to_int64_xrnint
274 #define bid32_to_int64_xrninta __bid32_to_int64_xrninta
275 #define bid32_to_int8_ceil __bid32_to_int8_ceil
276 #define bid32_to_int8_floor __bid32_to_int8_floor
277 #define bid32_to_int8_int __bid32_to_int8_int
278 #define bid32_to_int8_rnint __bid32_to_int8_rnint
279 #define bid32_to_int8_rninta __bid32_to_int8_rninta
280 #define bid32_to_int8_xceil __bid32_to_int8_xceil
281 #define bid32_to_int8_xfloor __bid32_to_int8_xfloor
282 #define bid32_to_int8_xint __bid32_to_int8_xint
283 #define bid32_to_int8_xrnint __bid32_to_int8_xrnint
284 #define bid32_to_int8_xrninta __bid32_to_int8_xrninta
285 #define bid32_to_uint16_ceil __bid32_to_uint16_ceil
286 #define bid32_to_uint16_floor __bid32_to_uint16_floor
287 #define bid32_to_uint16_int __bid32_to_uint16_int
288 #define bid32_to_uint16_rnint __bid32_to_uint16_rnint
289 #define bid32_to_uint16_rninta __bid32_to_uint16_rninta
290 #define bid32_to_uint16_xceil __bid32_to_uint16_xceil
291 #define bid32_to_uint16_xfloor __bid32_to_uint16_xfloor
292 #define bid32_to_uint16_xint __bid32_to_uint16_xint
293 #define bid32_to_uint16_xrnint __bid32_to_uint16_xrnint
294 #define bid32_to_uint16_xrninta __bid32_to_uint16_xrninta
295 #define bid32_to_uint32_ceil __bid32_to_uint32_ceil
296 #define bid32_to_uint32_floor __bid32_to_uint32_floor
297 #define bid32_to_uint32_int __bid32_to_uint32_int
298 #define bid32_to_uint32_rnint __bid32_to_uint32_rnint
299 #define bid32_to_uint32_rninta __bid32_to_uint32_rninta
300 #define bid32_to_uint32_xceil __bid32_to_uint32_xceil
301 #define bid32_to_uint32_xfloor __bid32_to_uint32_xfloor
302 #define bid32_to_uint32_xint __bid32_to_uint32_xint
303 #define bid32_to_uint32_xrnint __bid32_to_uint32_xrnint
304 #define bid32_to_uint32_xrninta __bid32_to_uint32_xrninta
305 #define bid32_to_uint64_ceil __bid32_to_uint64_ceil
306 #define bid32_to_uint64_floor __bid32_to_uint64_floor
307 #define bid32_to_uint64_int __bid32_to_uint64_int
308 #define bid32_to_uint64_rnint __bid32_to_uint64_rnint
309 #define bid32_to_uint64_rninta __bid32_to_uint64_rninta
310 #define bid32_to_uint64_xceil __bid32_to_uint64_xceil
311 #define bid32_to_uint64_xfloor __bid32_to_uint64_xfloor
312 #define bid32_to_uint64_xint __bid32_to_uint64_xint
313 #define bid32_to_uint64_xrnint __bid32_to_uint64_xrnint
314 #define bid32_to_uint64_xrninta __bid32_to_uint64_xrninta
315 #define bid32_to_uint8_ceil __bid32_to_uint8_ceil
316 #define bid32_to_uint8_floor __bid32_to_uint8_floor
317 #define bid32_to_uint8_int __bid32_to_uint8_int
318 #define bid32_to_uint8_rnint __bid32_to_uint8_rnint
319 #define bid32_to_uint8_rninta __bid32_to_uint8_rninta
320 #define bid32_to_uint8_xceil __bid32_to_uint8_xceil
321 #define bid32_to_uint8_xfloor __bid32_to_uint8_xfloor
322 #define bid32_to_uint8_xint __bid32_to_uint8_xint
323 #define bid32_to_uint8_xrnint __bid32_to_uint8_xrnint
324 #define bid32_to_uint8_xrninta __bid32_to_uint8_xrninta
325
326 #define bid64_add __bid64_add
327 #define bid64_sub __bid64_sub
328 #define bid64_mul __bid64_mul
329 #define bid64_div __bid64_div
330 #define bid64dq_div __bid64dq_div
331 #define bid64qd_div __bid64qd_div
332 #define bid64qq_div __bid64qq_div
333 #define bid64q_sqrt __bid64q_sqrt
334 #define bid64_sqrt __bid64_sqrt
335 #define bid64_rem __bid64_rem
336 #define bid64_fma __bid64_fma
337 #define bid64_scalbn __bid64_scalbn
338 #define bid64_ldexp __bid64_ldexp
339 #define bid_round128_19_38 __bid_round128_19_38
340 #define bid_round192_39_57 __bid_round192_39_57
341 #define bid_round256_58_76 __bid_round256_58_76
342 #define bid_round64_2_18 __bid_round64_2_18
343 #define bid64_nextafter __bid64_nextafter
344 #define bid64_nextdown __bid64_nextdown
345 #define bid64_nextup __bid64_nextup
346 #define bid_b2d __bid_b2d
347 #define bid_b2d2 __bid_b2d2
348 #define bid_b2d3 __bid_b2d3
349 #define bid_b2d4 __bid_b2d4
350 #define bid_b2d5 __bid_b2d5
351 #define bid_to_dpd128 __bid_to_dpd128
352 #define bid_to_dpd32 __bid_to_dpd32
353 #define bid_to_dpd64 __bid_to_dpd64
354 #define bid_d2b __bid_d2b
355 #define bid_d2b2 __bid_d2b2
356 #define bid_d2b3 __bid_d2b3
357 #define bid_d2b4 __bid_d2b4
358 #define bid_d2b5 __bid_d2b5
359 #define bid_d2b6 __bid_d2b6
360 #define bid_dpd_to_bid128 __bid_dpd_to_bid128
361 #define bid_dpd_to_bid32 __bid_dpd_to_bid32
362 #define bid_dpd_to_bid64 __bid_dpd_to_bid64
363 #define bid128_nextafter __bid128_nextafter
364 #define bid128_nextdown __bid128_nextdown
365 #define bid128_nextup __bid128_nextup
366 #define bid64_ilogb __bid64_ilogb
367 #define bid64_quantize __bid64_quantize
368 #define bid_estimate_bin_expon __bid_estimate_bin_expon
369 #define bid_estimate_decimal_digits __bid_estimate_decimal_digits
370 #define bid_power10_index_binexp __bid_power10_index_binexp
371 #define bid_power10_index_binexp_128 __bid_power10_index_binexp_128
372 #define bid_power10_table_128 __bid_power10_table_128
373 #define bid_reciprocals10_128 __bid_reciprocals10_128
374 #define bid_reciprocals10_64 __bid_reciprocals10_64
375 #define bid_recip_scale __bid_recip_scale
376 #define bid_round_const_table __bid_round_const_table
377 #define bid_round_const_table_128 __bid_round_const_table_128
378 #define bid_short_recip_scale __bid_short_recip_scale
379 #define bid64_from_string __bid64_from_string
380 #define bid64_to_string __bid64_to_string
381 #define bid_Inv_Tento9 __bid_Inv_Tento9
382 #define bid_midi_tbl __bid_midi_tbl
383 #define bid_Tento3 __bid_Tento3
384 #define bid_Tento6 __bid_Tento6
385 #define bid_Tento9 __bid_Tento9
386 #define bid_Twoto30_m_10to9 __bid_Twoto30_m_10to9
387 #define bid_Twoto60 __bid_Twoto60
388 #define bid_Twoto60_m_10to18 __bid_Twoto60_m_10to18
389 #define bid_convert_table __bid_convert_table
390 #define bid_factors __bid_factors
391 #define bid_packed_10000_zeros __bid_packed_10000_zeros
392 #define bid_char_table2 __bid_char_table2
393 #define bid_char_table3 __bid_char_table3
394 #define bid_Ex128m128 __bid_Ex128m128
395 #define bid_Ex192m192 __bid_Ex192m192
396 #define bid_Ex256m256 __bid_Ex256m256
397 #define bid_Ex64m64 __bid_Ex64m64
398 #define bid_half128 __bid_half128
399 #define bid_half192 __bid_half192
400 #define bid_half256 __bid_half256
401 #define bid_half64 __bid_half64
402 #define bid_Kx128 __bid_Kx128
403 #define bid_Kx192 __bid_Kx192
404 #define bid_Kx256 __bid_Kx256
405 #define bid_Kx64 __bid_Kx64
406 #define bid_mask128 __bid_mask128
407 #define bid_mask192 __bid_mask192
408 #define bid_mask256 __bid_mask256
409 #define bid_mask64 __bid_mask64
410 #define bid_maskhigh128 __bid_maskhigh128
411 #define bid_maskhigh128M __bid_maskhigh128M
412 #define bid_maskhigh192M __bid_maskhigh192M
413 #define bid_maskhigh256M __bid_maskhigh256M
414 #define bid_midpoint128 __bid_midpoint128
415 #define bid_midpoint192 __bid_midpoint192
416 #define bid_midpoint256 __bid_midpoint256
417 #define bid_midpoint64 __bid_midpoint64
418 #define bid_nr_digits __bid_nr_digits
419 #define bid_onehalf128 __bid_onehalf128
420 #define bid_onehalf128M __bid_onehalf128M
421 #define bid_onehalf192M __bid_onehalf192M
422 #define bid_onehalf256M __bid_onehalf256M
423 #define bid_shiftright128 __bid_shiftright128
424 #define bid_shiftright128M __bid_shiftright128M
425 #define bid_shiftright192M __bid_shiftright192M
426 #define bid_shiftright256M __bid_shiftright256M
427 #define bid_shift_ten2m3k128 __bid_shift_ten2m3k128
428 #define bid_shift_ten2m3k64 __bid_shift_ten2m3k64
429 #define bid_ten2k128 __bid_ten2k128
430 #define bid_ten2k256 __bid_ten2k256
431 #define bid_ten2k64 __bid_ten2k64
432 #define bid_ten2m3k128 __bid_ten2m3k128
433 #define bid_ten2m3k64 __bid_ten2m3k64
434 #define bid_ten2mk128 __bid_ten2mk128
435 #define bid_ten2mk128M __bid_ten2mk128M
436 #define bid_ten2mk128trunc __bid_ten2mk128trunc
437 #define bid_ten2mk128truncM __bid_ten2mk128truncM
438 #define bid_ten2mk192M __bid_ten2mk192M
439 #define bid_ten2mk192truncM __bid_ten2mk192truncM
440 #define bid_ten2mk256M __bid_ten2mk256M
441 #define bid_ten2mk256truncM __bid_ten2mk256truncM
442 #define bid_ten2mk64 __bid_ten2mk64
443 #define bid_ten2mxtrunc128 __bid_ten2mxtrunc128
444 #define bid_ten2mxtrunc192 __bid_ten2mxtrunc192
445 #define bid_ten2mxtrunc256 __bid_ten2mxtrunc256
446 #define bid_ten2mxtrunc64 __bid_ten2mxtrunc64
447 #define bid128_add __bid128_add
448 #define bid128dd_add __bid128dd_add
449 #define bid128dd_sub __bid128dd_sub
450 #define bid128dq_add __bid128dq_add
451 #define bid128dq_sub __bid128dq_sub
452 #define bid128qd_add __bid128qd_add
453 #define bid128qd_sub __bid128qd_sub
454 #define bid128_sub __bid128_sub
455 #define bid64dq_add __bid64dq_add
456 #define bid64dq_sub __bid64dq_sub
457 #define bid64qd_add __bid64qd_add
458 #define bid64qd_sub __bid64qd_sub
459 #define bid64qq_add __bid64qq_add
460 #define bid64qq_sub __bid64qq_sub
461 #define bid128dd_mul __bid128dd_mul
462 #define bid128dq_mul __bid128dq_mul
463 #define bid128_mul __bid128_mul
464 #define bid128qd_mul __bid128qd_mul
465 #define bid64dq_mul __bid64dq_mul
466 #define bid64qd_mul __bid64qd_mul
467 #define bid64qq_mul __bid64qq_mul
468 #define bid128dd_div __bid128dd_div
469 #define bid128_div __bid128_div
470 #define bid128dq_div __bid128dq_div
471 #define bid128qd_div __bid128qd_div
472 #define bid128d_sqrt __bid128d_sqrt
473 #define bid128_sqrt __bid128_sqrt
474 #define bid128ddd_fma __bid128ddd_fma
475 #define bid128ddq_fma __bid128ddq_fma
476 #define bid128dqd_fma __bid128dqd_fma
477 #define bid128dqq_fma __bid128dqq_fma
478 #define bid128_fma __bid128_fma
479 #define bid128qdd_fma __bid128qdd_fma
480 #define bid128qdq_fma __bid128qdq_fma
481 #define bid128qqd_fma __bid128qqd_fma
482 #define bid64ddq_fma __bid64ddq_fma
483 #define bid64dqd_fma __bid64dqd_fma
484 #define bid64dqq_fma __bid64dqq_fma
485 #define bid64qdd_fma __bid64qdd_fma
486 #define bid64qdq_fma __bid64qdq_fma
487 #define bid64qqd_fma __bid64qqd_fma
488 #define bid64qqq_fma __bid64qqq_fma
489 #define bid128_round_integral_exact __bid128_round_integral_exact
490 #define bid128_round_integral_nearest_away __bid128_round_integral_nearest_away
491 #define bid128_round_integral_nearest_even __bid128_round_integral_nearest_even
492 #define bid128_round_integral_negative __bid128_round_integral_negative
493 #define bid128_round_integral_positive __bid128_round_integral_positive
494 #define bid128_round_integral_zero __bid128_round_integral_zero
495 #define bid64_round_integral_exact __bid64_round_integral_exact
496 #define bid64_round_integral_nearest_away __bid64_round_integral_nearest_away
497 #define bid64_round_integral_nearest_even __bid64_round_integral_nearest_even
498 #define bid64_round_integral_negative __bid64_round_integral_negative
499 #define bid64_round_integral_positive __bid64_round_integral_positive
500 #define bid64_round_integral_zero __bid64_round_integral_zero
501 #define bid128_quantize __bid128_quantize
502 #define bid128_scalbn __bid128_scalbn
503 #define bid128_ldexp __bid128_ldexp
504 #define bid64_maxnum __bid64_maxnum
505 #define bid64_maxnum_mag __bid64_maxnum_mag
506 #define bid64_minnum __bid64_minnum
507 #define bid64_minnum_mag __bid64_minnum_mag
508 #define bid128_maxnum __bid128_maxnum
509 #define bid128_maxnum_mag __bid128_maxnum_mag
510 #define bid128_minnum __bid128_minnum
511 #define bid128_minnum_mag __bid128_minnum_mag
512 #define bid128_rem __bid128_rem
513 #define bid128_ilogb __bid128_ilogb
514 #define bid_getDecimalRoundingDirection __bid_getDecimalRoundingDirection
515 #define bid_is754 __bid_is754
516 #define bid_is754R __bid_is754R
517 #define bid_signalException __bid_signalException
518 #define bid_lowerFlags __bid_lowerFlags
519 #define bid_restoreFlags __bid_restoreFlags
520 #define bid_saveFlags __bid_saveFlags
521 #define bid_setDecimalRoundingDirection __bid_setDecimalRoundingDirection
522 #define bid_testFlags __bid_testFlags
523 #define bid_testSavedFlags __bid_testSavedFlags
524 #define bid32_to_bid64 __bid32_to_bid64
525 #define bid64_to_bid32 __bid64_to_bid32
526 #define bid128_to_string __bid128_to_string
527 #define mod10_18_tbl __bid_mod10_18_tbl
528 #define bid128_to_bid32 __bid128_to_bid32
529 #define bid32_to_bid128 __bid32_to_bid128
530 #define bid128_to_bid64 __bid128_to_bid64
531 #define bid64_to_bid128 __bid64_to_bid128
532 #define bid128_from_string __bid128_from_string
533 #define bid128_from_int32 __bid128_from_int32
534 #define bid128_from_int64 __bid128_from_int64
535 #define bid128_from_uint32 __bid128_from_uint32
536 #define bid128_from_uint64 __bid128_from_uint64
537 #define bid64_from_int32 __bid64_from_int32
538 #define bid64_from_int64 __bid64_from_int64
539 #define bid64_from_uint32 __bid64_from_uint32
540 #define bid64_from_uint64 __bid64_from_uint64
541 #define bid64_abs __bid64_abs
542 #define bid64_class __bid64_class
543 #define bid64_copy __bid64_copy
544 #define bid64_copySign __bid64_copySign
545 #define bid64_isCanonical __bid64_isCanonical
546 #define bid64_isFinite __bid64_isFinite
547 #define bid64_isInf __bid64_isInf
548 #define bid64_isNaN __bid64_isNaN
549 #define bid64_isNormal __bid64_isNormal
550 #define bid64_isSignaling __bid64_isSignaling
551 #define bid64_isSigned __bid64_isSigned
552 #define bid64_isSubnormal __bid64_isSubnormal
553 #define bid64_isZero __bid64_isZero
554 #define bid64_negate __bid64_negate
555 #define bid64_radix __bid64_radix
556 #define bid64_sameQuantum __bid64_sameQuantum
557 #define bid64_totalOrder __bid64_totalOrder
558 #define bid64_totalOrderMag __bid64_totalOrderMag
559 #define bid128_abs __bid128_abs
560 #define bid128_class __bid128_class
561 #define bid128_copy __bid128_copy
562 #define bid128_copySign __bid128_copySign
563 #define bid128_isCanonical __bid128_isCanonical
564 #define bid128_isFinite __bid128_isFinite
565 #define bid128_isInf __bid128_isInf
566 #define bid128_isNaN __bid128_isNaN
567 #define bid128_isNormal __bid128_isNormal
568 #define bid128_isSignaling __bid128_isSignaling
569 #define bid128_isSigned __bid128_isSigned
570 #define bid128_isSubnormal __bid128_isSubnormal
571 #define bid128_isZero __bid128_isZero
572 #define bid128_negate __bid128_negate
573 #define bid128_radix __bid128_radix
574 #define bid128_sameQuantum __bid128_sameQuantum
575 #define bid128_totalOrder __bid128_totalOrder
576 #define bid128_totalOrderMag __bid128_totalOrderMag
577 #define bid64_quiet_equal __bid64_quiet_equal
578 #define bid64_quiet_greater __bid64_quiet_greater
579 #define bid64_quiet_greater_equal __bid64_quiet_greater_equal
580 #define bid64_quiet_greater_unordered __bid64_quiet_greater_unordered
581 #define bid64_quiet_less __bid64_quiet_less
582 #define bid64_quiet_less_equal __bid64_quiet_less_equal
583 #define bid64_quiet_less_unordered __bid64_quiet_less_unordered
584 #define bid64_quiet_not_equal __bid64_quiet_not_equal
585 #define bid64_quiet_not_greater __bid64_quiet_not_greater
586 #define bid64_quiet_not_less __bid64_quiet_not_less
587 #define bid64_quiet_ordered __bid64_quiet_ordered
588 #define bid64_quiet_unordered __bid64_quiet_unordered
589 #define bid64_signaling_greater __bid64_signaling_greater
590 #define bid64_signaling_greater_equal __bid64_signaling_greater_equal
591 #define bid64_signaling_greater_unordered __bid64_signaling_greater_unordered
592 #define bid64_signaling_less __bid64_signaling_less
593 #define bid64_signaling_less_equal __bid64_signaling_less_equal
594 #define bid64_signaling_less_unordered __bid64_signaling_less_unordered
595 #define bid64_signaling_not_greater __bid64_signaling_not_greater
596 #define bid64_signaling_not_less __bid64_signaling_not_less
597 #define bid128_quiet_equal __bid128_quiet_equal
598 #define bid128_quiet_greater __bid128_quiet_greater
599 #define bid128_quiet_greater_equal __bid128_quiet_greater_equal
600 #define bid128_quiet_greater_unordered __bid128_quiet_greater_unordered
601 #define bid128_quiet_less __bid128_quiet_less
602 #define bid128_quiet_less_equal __bid128_quiet_less_equal
603 #define bid128_quiet_less_unordered __bid128_quiet_less_unordered
604 #define bid128_quiet_not_equal __bid128_quiet_not_equal
605 #define bid128_quiet_not_greater __bid128_quiet_not_greater
606 #define bid128_quiet_not_less __bid128_quiet_not_less
607 #define bid128_quiet_ordered __bid128_quiet_ordered
608 #define bid128_quiet_unordered __bid128_quiet_unordered
609 #define bid128_signaling_greater __bid128_signaling_greater
610 #define bid128_signaling_greater_equal __bid128_signaling_greater_equal
611 #define bid128_signaling_greater_unordered __bid128_signaling_greater_unordered
612 #define bid128_signaling_less __bid128_signaling_less
613 #define bid128_signaling_less_equal __bid128_signaling_less_equal
614 #define bid128_signaling_less_unordered __bid128_signaling_less_unordered
615 #define bid128_signaling_not_greater __bid128_signaling_not_greater
616 #define bid128_signaling_not_less __bid128_signaling_not_less
617 #define bid64_to_int32_ceil __bid64_to_int32_ceil
618 #define bid64_to_int32_floor __bid64_to_int32_floor
619 #define bid64_to_int32_int __bid64_to_int32_int
620 #define bid64_to_int32_rnint __bid64_to_int32_rnint
621 #define bid64_to_int32_rninta __bid64_to_int32_rninta
622 #define bid64_to_int32_xceil __bid64_to_int32_xceil
623 #define bid64_to_int32_xfloor __bid64_to_int32_xfloor
624 #define bid64_to_int32_xint __bid64_to_int32_xint
625 #define bid64_to_int32_xrnint __bid64_to_int32_xrnint
626 #define bid64_to_int32_xrninta __bid64_to_int32_xrninta
627 #define bid64_to_uint32_ceil __bid64_to_uint32_ceil
628 #define bid64_to_uint32_floor __bid64_to_uint32_floor
629 #define bid64_to_uint32_int __bid64_to_uint32_int
630 #define bid64_to_uint32_rnint __bid64_to_uint32_rnint
631 #define bid64_to_uint32_rninta __bid64_to_uint32_rninta
632 #define bid64_to_uint32_xceil __bid64_to_uint32_xceil
633 #define bid64_to_uint32_xfloor __bid64_to_uint32_xfloor
634 #define bid64_to_uint32_xint __bid64_to_uint32_xint
635 #define bid64_to_uint32_xrnint __bid64_to_uint32_xrnint
636 #define bid64_to_uint32_xrninta __bid64_to_uint32_xrninta
637 #define bid64_to_int64_ceil __bid64_to_int64_ceil
638 #define bid64_to_int64_floor __bid64_to_int64_floor
639 #define bid64_to_int64_int __bid64_to_int64_int
640 #define bid64_to_int64_rnint __bid64_to_int64_rnint
641 #define bid64_to_int64_rninta __bid64_to_int64_rninta
642 #define bid64_to_int64_xceil __bid64_to_int64_xceil
643 #define bid64_to_int64_xfloor __bid64_to_int64_xfloor
644 #define bid64_to_int64_xint __bid64_to_int64_xint
645 #define bid64_to_int64_xrnint __bid64_to_int64_xrnint
646 #define bid64_to_int64_xrninta __bid64_to_int64_xrninta
647 #define bid64_to_uint64_ceil __bid64_to_uint64_ceil
648 #define bid64_to_uint64_floor __bid64_to_uint64_floor
649 #define bid64_to_uint64_int __bid64_to_uint64_int
650 #define bid64_to_uint64_rnint __bid64_to_uint64_rnint
651 #define bid64_to_uint64_rninta __bid64_to_uint64_rninta
652 #define bid64_to_uint64_xceil __bid64_to_uint64_xceil
653 #define bid64_to_uint64_xfloor __bid64_to_uint64_xfloor
654 #define bid64_to_uint64_xint __bid64_to_uint64_xint
655 #define bid64_to_uint64_xrnint __bid64_to_uint64_xrnint
656 #define bid64_to_uint64_xrninta __bid64_to_uint64_xrninta
657 #define bid128_to_int32_ceil __bid128_to_int32_ceil
658 #define bid128_to_int32_floor __bid128_to_int32_floor
659 #define bid128_to_int32_int __bid128_to_int32_int
660 #define bid128_to_int32_rnint __bid128_to_int32_rnint
661 #define bid128_to_int32_rninta __bid128_to_int32_rninta
662 #define bid128_to_int32_xceil __bid128_to_int32_xceil
663 #define bid128_to_int32_xfloor __bid128_to_int32_xfloor
664 #define bid128_to_int32_xint __bid128_to_int32_xint
665 #define bid128_to_int32_xrnint __bid128_to_int32_xrnint
666 #define bid128_to_int32_xrninta __bid128_to_int32_xrninta
667 #define bid128_to_uint32_ceil __bid128_to_uint32_ceil
668 #define bid128_to_uint32_floor __bid128_to_uint32_floor
669 #define bid128_to_uint32_int __bid128_to_uint32_int
670 #define bid128_to_uint32_rnint __bid128_to_uint32_rnint
671 #define bid128_to_uint32_rninta __bid128_to_uint32_rninta
672 #define bid128_to_uint32_xceil __bid128_to_uint32_xceil
673 #define bid128_to_uint32_xfloor __bid128_to_uint32_xfloor
674 #define bid128_to_uint32_xint __bid128_to_uint32_xint
675 #define bid128_to_uint32_xrnint __bid128_to_uint32_xrnint
676 #define bid128_to_uint32_xrninta __bid128_to_uint32_xrninta
677 #define bid128_to_int64_ceil __bid128_to_int64_ceil
678 #define bid128_to_int64_floor __bid128_to_int64_floor
679 #define bid128_to_int64_int __bid128_to_int64_int
680 #define bid128_to_int64_rnint __bid128_to_int64_rnint
681 #define bid128_to_int64_rninta __bid128_to_int64_rninta
682 #define bid128_to_int64_xceil __bid128_to_int64_xceil
683 #define bid128_to_int64_xfloor __bid128_to_int64_xfloor
684 #define bid128_to_int64_xint __bid128_to_int64_xint
685 #define bid128_to_int64_xrnint __bid128_to_int64_xrnint
686 #define bid128_to_int64_xrninta __bid128_to_int64_xrninta
687 #define bid128_to_uint64_ceil __bid128_to_uint64_ceil
688 #define bid128_to_uint64_floor __bid128_to_uint64_floor
689 #define bid128_to_uint64_int __bid128_to_uint64_int
690 #define bid128_to_uint64_rnint __bid128_to_uint64_rnint
691 #define bid128_to_uint64_rninta __bid128_to_uint64_rninta
692 #define bid128_to_uint64_xceil __bid128_to_uint64_xceil
693 #define bid128_to_uint64_xfloor __bid128_to_uint64_xfloor
694 #define bid128_to_uint64_xint __bid128_to_uint64_xint
695 #define bid128_to_uint64_xrnint __bid128_to_uint64_xrnint
696 #define bid128_to_uint64_xrninta __bid128_to_uint64_xrninta
697 #define bid128_to_binary128 __bid128_to_binary128
698 #define bid128_to_binary32 __bid128_to_binary32
699 #define bid128_to_binary64 __bid128_to_binary64
700 #define bid128_to_binary80 __bid128_to_binary80
701 #define bid32_to_binary128 __bid32_to_binary128
702 #define bid32_to_binary32 __bid32_to_binary32
703 #define bid32_to_binary64 __bid32_to_binary64
704 #define bid32_to_binary80 __bid32_to_binary80
705 #define bid64_to_binary128 __bid64_to_binary128
706 #define bid64_to_binary32 __bid64_to_binary32
707 #define bid64_to_binary64 __bid64_to_binary64
708 #define bid64_to_binary80 __bid64_to_binary80
709 #define binary128_to_bid128 __binary128_to_bid128
710 #define binary128_to_bid32 __binary128_to_bid32
711 #define binary128_to_bid64 __binary128_to_bid64
712 #define binary32_to_bid128 __binary32_to_bid128
713 #define binary32_to_bid32 __binary32_to_bid32
714 #define binary32_to_bid64 __binary32_to_bid64
715 #define binary64_to_bid128 __binary64_to_bid128
716 #define binary64_to_bid32 __binary64_to_bid32
717 #define binary64_to_bid64 __binary64_to_bid64
718 #define binary80_to_bid128 __binary80_to_bid128
719 #define binary80_to_bid32 __binary80_to_bid32
720 #define binary80_to_bid64 __binary80_to_bid64
721 #define bid64_to_uint16_ceil __bid64_to_uint16_ceil
722 #define bid64_to_uint16_floor __bid64_to_uint16_floor
723 #define bid64_to_uint16_int __bid64_to_uint16_int
724 #define bid64_to_uint16_rnint __bid64_to_uint16_rnint
725 #define bid64_to_uint16_rninta __bid64_to_uint16_rninta
726 #define bid64_to_uint16_xceil __bid64_to_uint16_xceil
727 #define bid64_to_uint16_xfloor __bid64_to_uint16_xfloor
728 #define bid64_to_uint16_xint __bid64_to_uint16_xint
729 #define bid64_to_uint16_xrnint __bid64_to_uint16_xrnint
730 #define bid64_to_uint16_xrninta __bid64_to_uint16_xrninta
731 #define bid64_to_int16_ceil __bid64_to_int16_ceil
732 #define bid64_to_int16_floor __bid64_to_int16_floor
733 #define bid64_to_int16_int __bid64_to_int16_int
734 #define bid64_to_int16_rnint __bid64_to_int16_rnint
735 #define bid64_to_int16_rninta __bid64_to_int16_rninta
736 #define bid64_to_int16_xceil __bid64_to_int16_xceil
737 #define bid64_to_int16_xfloor __bid64_to_int16_xfloor
738 #define bid64_to_int16_xint __bid64_to_int16_xint
739 #define bid64_to_int16_xrnint __bid64_to_int16_xrnint
740 #define bid64_to_int16_xrninta __bid64_to_int16_xrninta
741 #define bid128_to_uint16_ceil __bid128_to_uint16_ceil
742 #define bid128_to_uint16_floor __bid128_to_uint16_floor
743 #define bid128_to_uint16_int __bid128_to_uint16_int
744 #define bid128_to_uint16_rnint __bid128_to_uint16_rnint
745 #define bid128_to_uint16_rninta __bid128_to_uint16_rninta
746 #define bid128_to_uint16_xceil __bid128_to_uint16_xceil
747 #define bid128_to_uint16_xfloor __bid128_to_uint16_xfloor
748 #define bid128_to_uint16_xint __bid128_to_uint16_xint
749 #define bid128_to_uint16_xrnint __bid128_to_uint16_xrnint
750 #define bid128_to_uint16_xrninta __bid128_to_uint16_xrninta
751 #define bid128_to_int16_ceil __bid128_to_int16_ceil
752 #define bid128_to_int16_floor __bid128_to_int16_floor
753 #define bid128_to_int16_int __bid128_to_int16_int
754 #define bid128_to_int16_rnint __bid128_to_int16_rnint
755 #define bid128_to_int16_rninta __bid128_to_int16_rninta
756 #define bid128_to_int16_xceil __bid128_to_int16_xceil
757 #define bid128_to_int16_xfloor __bid128_to_int16_xfloor
758 #define bid128_to_int16_xint __bid128_to_int16_xint
759 #define bid128_to_int16_xrnint __bid128_to_int16_xrnint
760 #define bid128_to_int16_xrninta __bid128_to_int16_xrninta
761 #define bid64_to_uint8_ceil __bid64_to_uint8_ceil
762 #define bid64_to_uint8_floor __bid64_to_uint8_floor
763 #define bid64_to_uint8_int __bid64_to_uint8_int
764 #define bid64_to_uint8_rnint __bid64_to_uint8_rnint
765 #define bid64_to_uint8_rninta __bid64_to_uint8_rninta
766 #define bid64_to_uint8_xceil __bid64_to_uint8_xceil
767 #define bid64_to_uint8_xfloor __bid64_to_uint8_xfloor
768 #define bid64_to_uint8_xint __bid64_to_uint8_xint
769 #define bid64_to_uint8_xrnint __bid64_to_uint8_xrnint
770 #define bid64_to_uint8_xrninta __bid64_to_uint8_xrninta
771 #define bid64_to_int8_ceil __bid64_to_int8_ceil
772 #define bid64_to_int8_floor __bid64_to_int8_floor
773 #define bid64_to_int8_int __bid64_to_int8_int
774 #define bid64_to_int8_rnint __bid64_to_int8_rnint
775 #define bid64_to_int8_rninta __bid64_to_int8_rninta
776 #define bid64_to_int8_xceil __bid64_to_int8_xceil
777 #define bid64_to_int8_xfloor __bid64_to_int8_xfloor
778 #define bid64_to_int8_xint __bid64_to_int8_xint
779 #define bid64_to_int8_xrnint __bid64_to_int8_xrnint
780 #define bid64_to_int8_xrninta __bid64_to_int8_xrninta
781 #define bid128_to_uint8_ceil __bid128_to_uint8_ceil
782 #define bid128_to_uint8_floor __bid128_to_uint8_floor
783 #define bid128_to_uint8_int __bid128_to_uint8_int
784 #define bid128_to_uint8_rnint __bid128_to_uint8_rnint
785 #define bid128_to_uint8_rninta __bid128_to_uint8_rninta
786 #define bid128_to_uint8_xceil __bid128_to_uint8_xceil
787 #define bid128_to_uint8_xfloor __bid128_to_uint8_xfloor
788 #define bid128_to_uint8_xint __bid128_to_uint8_xint
789 #define bid128_to_uint8_xrnint __bid128_to_uint8_xrnint
790 #define bid128_to_uint8_xrninta __bid128_to_uint8_xrninta
791 #define bid128_to_int8_ceil __bid128_to_int8_ceil
792 #define bid128_to_int8_floor __bid128_to_int8_floor
793 #define bid128_to_int8_int __bid128_to_int8_int
794 #define bid128_to_int8_rnint __bid128_to_int8_rnint
795 #define bid128_to_int8_rninta __bid128_to_int8_rninta
796 #define bid128_to_int8_xceil __bid128_to_int8_xceil
797 #define bid128_to_int8_xfloor __bid128_to_int8_xfloor
798 #define bid128_to_int8_xint __bid128_to_int8_xint
799 #define bid128_to_int8_xrnint __bid128_to_int8_xrnint
800 #define bid128_to_int8_xrninta __bid128_to_int8_xrninta
801
802 #define bid32_inf __bid32_inf
803 #define bid64_inf __bid64_inf
804 #define bid128_inf __bid128_inf
805
806 #define bid_feclearexcept __bid_feclearexcept
807 #define bid_fegetexceptflag __bid_fegetexceptflag
808 #define bid_feraiseexcept __bid_feraiseexcept
809 #define bid_fesetexceptflag __bid_fesetexceptflag
810 #define bid_fetestexcept __bid_fetestexcept
811
812 #define bid_strtod128 __bid_strtod128
813 #define bid_strtod64 __bid_strtod64
814 #define bid_strtod32 __bid_strtod32
815 #define bid_wcstod128 __bid_wcstod128
816 #define bid_wcstod64 __bid_wcstod64
817 #define bid_wcstod32 __bid_wcstod32
818
819
820
821 ///////////////////////////////////////////////////////////////
822 #ifdef IN_LIBGCC2
823 #if !defined ENABLE_DECIMAL_BID_FORMAT || !ENABLE_DECIMAL_BID_FORMAT
824 #error BID not enabled in libbid
825 #endif
826
827 #ifndef BID_BIG_ENDIAN
828 #define BID_BIG_ENDIAN LIBGCC2_FLOAT_WORDS_BIG_ENDIAN
829 #endif
830
831 #ifndef BID_THREAD
832 #if defined (HAVE_CC_TLS) && defined (USE_TLS)
833 #define BID_THREAD __thread
834 #endif
835 #endif
836
837 #define BID__intptr_t_defined
838 #define DECIMAL_CALL_BY_REFERENCE 0
839 #define DECIMAL_GLOBAL_ROUNDING 1
840 #define DECIMAL_GLOBAL_ROUNDING_ACCESS_FUNCTIONS 1
841 #define DECIMAL_GLOBAL_EXCEPTION_FLAGS 1
842 #define DECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS 1
843 #define BID_HAS_GCC_DECIMAL_INTRINSICS 1
844 #endif /* IN_LIBGCC2 */
845
846 // Configuration Options
847
848 #define DECIMAL_TINY_DETECTION_AFTER_ROUNDING 0
849 #define BINARY_TINY_DETECTION_AFTER_ROUNDING 1
850
851 #define BID_SET_STATUS_FLAGS
852
853 #ifndef BID_THREAD
854 #if defined (_MSC_VER) //Windows
855 #define BID_THREAD __declspec(thread)
856 #else
857 #if !defined(__APPLE__) //Linux, FreeBSD
858 #define BID_THREAD __thread
859 #else //Mac OSX, TBD
860 #define BID_THREAD
861 #endif //Linux or Mac
862 #endif //Windows
863 #endif //BID_THREAD
864
865
866 #ifndef BID_HAS_GCC_DECIMAL_INTRINSICS
867 #define BID_HAS_GCC_DECIMAL_INTRINSICS 0
868 #endif
869
870 // set sizeof (long) here, for bid32_lrint(), bid64_lrint(), bid128_lrint(),
871 // and for bid32_lround(), bid64_lround(), bid128_lround()
872 #ifndef BID_SIZE_LONG
873 #if defined(WINDOWS)
874 #define BID_SIZE_LONG 4
875 #else
876 #if defined(__x86_64__) || defined (__ia64__) || defined(HPUX_OS_64)
877 #define BID_SIZE_LONG 8
878 #else
879 #define BID_SIZE_LONG 4
880 #endif
881 #endif
882 #endif
883
884 #if !defined(WINDOWS) || defined(__INTEL_COMPILER)
885 // #define UNCHANGED_BINARY_STATUS_FLAGS
886 #endif
887 // #define HPUX_OS
888
889 // If DECIMAL_CALL_BY_REFERENCE is defined then numerical arguments and results
890 // are passed by reference otherwise they are passed by value (except that
891 // a pointer is always passed to the status flags)
892
893 #ifndef DECIMAL_CALL_BY_REFERENCE
894 #define DECIMAL_CALL_BY_REFERENCE 0
895 #endif
896
897 // If DECIMAL_GLOBAL_ROUNDING is defined then the rounding mode is a global
898 // variable _IDEC_glbround, otherwise it is passed as a parameter when needed
899
900 #ifndef DECIMAL_GLOBAL_ROUNDING
901 #define DECIMAL_GLOBAL_ROUNDING 0
902 #endif
903
904 #ifndef DECIMAL_GLOBAL_ROUNDING_ACCESS_FUNCTIONS
905 #define DECIMAL_GLOBAL_ROUNDING_ACCESS_FUNCTIONS 0
906 #endif
907
908 // If DECIMAL_GLOBAL_EXCEPTION_FLAGS is defined then the exception status flags
909 // are represented by a global variable _IDEC_glbflags, otherwise they are
910 // passed as a parameter when needed
911
912 #ifndef DECIMAL_GLOBAL_EXCEPTION_FLAGS
913 #define DECIMAL_GLOBAL_EXCEPTION_FLAGS 0
914 #endif
915
916 #ifndef DECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS
917 #define DECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS 0
918 #endif
919
920 // If DECIMAL_ALTERNATE_EXCEPTION_HANDLING is defined then the exception masks
921 // are examined and exception handling information is provided to the caller
922 // if alternate exception handling is necessary
923
924 #ifndef DECIMAL_ALTERNATE_EXCEPTION_HANDLING
925 #define DECIMAL_ALTERNATE_EXCEPTION_HANDLING 0
926 #endif
927
928 typedef unsigned int _IDEC_round;
929 typedef unsigned int _IDEC_flags; // could be a struct with diagnostic info
930
931 #if DECIMAL_ALTERNATE_EXCEPTION_HANDLING
932 // If DECIMAL_GLOBAL_EXCEPTION_MASKS is defined then the exception mask bits
933 // are represented by a global variable _IDEC_exceptionmasks, otherwise they
934 // are passed as a parameter when needed; DECIMAL_GLOBAL_EXCEPTION_MASKS is
935 // ignored
936 // if DECIMAL_ALTERNATE_EXCEPTION_HANDLING is not defined
937 // **************************************************************************
938 #define DECIMAL_GLOBAL_EXCEPTION_MASKS 0
939 // **************************************************************************
940
941 // If DECIMAL_GLOBAL_EXCEPTION_INFO is defined then the alternate exception
942 // handling information is represented by a global data structure
943 // _IDEC_glbexcepthandling, otherwise it is passed by reference as a
944 // parameter when needed; DECIMAL_GLOBAL_EXCEPTION_INFO is ignored
945 // if DECIMAL_ALTERNATE_EXCEPTION_HANDLING is not defined
946 // **************************************************************************
947 #define DECIMAL_GLOBAL_EXCEPTION_INFO 0
948 // **************************************************************************
949 #endif
950
951 // Notes: 1) rnd_mode from _RND_MODE_ARG is used by the caller of a function
952 // from this library, and can be any name
953 // 2) rnd_mode and prnd_mode from _RND_MODE_PARAM are fixed names
954 // and *must* be used in the library functions
955 // 3) _IDEC_glbround is the fixed name for the global variable holding
956 // the rounding mode
957
958 #if !DECIMAL_GLOBAL_ROUNDING
959 #if DECIMAL_CALL_BY_REFERENCE
960 #define _RND_MODE_ARG , &rnd_mode
961 #define _RND_MODE_PARAM , _IDEC_round *prnd_mode
962 #define _RND_MODE_PARAM_0 _IDEC_round *prnd_mode
963 #define _RND_MODE_ARG_ALONE &rnd_mode
964 #define _RND_MODE_PARAM_ALONE _IDEC_round *prnd_mode
965 #else
966 #define _RND_MODE_ARG , rnd_mode
967 #define _RND_MODE_PARAM , _IDEC_round rnd_mode
968 #define _RND_MODE_PARAM_0 _IDEC_round rnd_mode
969 #define _RND_MODE_ARG_ALONE rnd_mode
970 #define _RND_MODE_PARAM_ALONE _IDEC_round rnd_mode
971 #endif
972 #else
973 #define _RND_MODE_ARG
974 #define _RND_MODE_PARAM
975 #define _RND_MODE_ARG_ALONE
976 #define _RND_MODE_PARAM_ALONE
977 #define rnd_mode _IDEC_glbround
978 #endif
979
980 // Notes: 1) pfpsf from _EXC_FLAGS_ARG is used by the caller of a function
981 // from this library, and can be any name
982 // 2) pfpsf from _EXC_FLAGS_PARAM is a fixed name and *must* be used
983 // in the library functions
984 // 3) _IDEC_glbflags is the fixed name for the global variable holding
985 // the floating-point status flags
986 #if !DECIMAL_GLOBAL_EXCEPTION_FLAGS
987 #define _EXC_FLAGS_ARG , pfpsf
988 #define _EXC_FLAGS_PARAM , _IDEC_flags *pfpsf
989 #else
990 #define _EXC_FLAGS_ARG
991 #define _EXC_FLAGS_PARAM
992 #define pfpsf &_IDEC_glbflags
993 #endif
994
995 #if DECIMAL_GLOBAL_ROUNDING
996 BID_EXTERN_C BID_THREAD _IDEC_round _IDEC_glbround;
997 #endif
998
999 #if DECIMAL_GLOBAL_EXCEPTION_FLAGS
1000 BID_EXTERN_C BID_THREAD _IDEC_flags _IDEC_glbflags;
1001 #endif
1002
1003 #if DECIMAL_ALTERNATE_EXCEPTION_HANDLING
1004 #if DECIMAL_GLOBAL_EXCEPTION_MASKS
1005 BID_EXTERN_C BID_THREAD _IDEC_exceptionmasks _IDEC_glbexceptionmasks;
1006 #endif
1007 #if DECIMAL_GLOBAL_EXCEPTION_INFO
1008 BID_EXTERN_C BID_THREAD _IDEC_excepthandling _IDEC_glbexcepthandling;
1009 #endif
1010 #endif
1011
1012 #if DECIMAL_ALTERNATE_EXCEPTION_HANDLING
1013
1014 // Notes: 1) exc_mask from _EXC_MASKS_ARG is used by the caller of a function
1015 // from this library, and can be any name
1016 // 2) exc_mask and pexc_mask from _EXC_MASKS_PARAM are fixed names
1017 // and *must* be used in the library functions
1018 // 3) _IDEC_glbexceptionmasks is the fixed name for the global
1019 // variable holding the floating-point exception masks
1020 #if !DECIMAL_GLOBAL_EXCEPTION_MASKS
1021 #if DECIMAL_CALL_BY_REFERENCE
1022 #define _EXC_MASKS_ARG , &exc_mask
1023 #define _EXC_MASKS_PARAM , _IDEC_exceptionmasks *pexc_mask
1024 #else
1025 #define _EXC_MASKS_ARG , exc_mask
1026 #define _EXC_MASKS_PARAM , _IDEC_exceptionmasks exc_mask
1027 #endif
1028 #else
1029 #define _EXC_MASKS_ARG
1030 #define _EXC_MASKS_PARAM
1031 #define exc_mask _IDEC_glbexceptionmasks
1032 #endif
1033
1034 // Notes: 1) BID_pexc_info from _EXC_INFO_ARG is used by the caller of a function
1035 // from this library, and can be any name
1036 // 2) BID_pexc_info from _EXC_INFO_PARAM is a fixed name and *must* be
1037 // used in the library functions
1038 // 3) _IDEC_glbexcepthandling is the fixed name for the global
1039 // variable holding the floating-point exception information
1040 #if !DECIMAL_GLOBAL_EXCEPTION_INFO
1041 #define _EXC_INFO_ARG , BID_pexc_info
1042 #define _EXC_INFO_PARAM , _IDEC_excepthandling *BID_pexc_info
1043 #else
1044 #define _EXC_INFO_ARG
1045 #define _EXC_INFO_PARAM
1046 #define BID_pexc_info &_IDEC_glbexcepthandling
1047 #endif
1048 #else
1049 #define _EXC_MASKS_ARG
1050 #define _EXC_MASKS_PARAM
1051 #define _EXC_INFO_ARG
1052 #define _EXC_INFO_PARAM
1053 #endif
1054
1055 #ifndef BID_BIG_ENDIAN
1056 #define BID_BIG_ENDIAN 0
1057 #endif
1058
1059 #if BID_BIG_ENDIAN
1060 #define BID_SWAP128(x) { \
1061 BID_UINT64 sw; \
1062 sw = (x).w[1]; \
1063 (x).w[1] = (x).w[0]; \
1064 (x).w[0] = sw; \
1065 }
1066 #else
1067 #define BID_SWAP128(x)
1068 #endif
1069
1070 #if DECIMAL_CALL_BY_REFERENCE
1071 #define BID_RETURN_VAL(x) { BID_OPT_RESTORE_BINARY_FLAGS() *pres = (x); return; }
1072 #if BID_BIG_ENDIAN && defined BID_128RES
1073 #define BID_RETURN(x) { BID_OPT_RESTORE_BINARY_FLAGS() BID_SWAP128(x); *pres = (x); return; }
1074 #define BID_RETURN_NOFLAGS(x) { BID_SWAP128(x); *pres = (x); return; }
1075 #else
1076 #define BID_RETURN(x) { BID_OPT_RESTORE_BINARY_FLAGS() *pres = (x); return; }
1077 #define BID_RETURN_NOFLAGS(x) { *pres = (x); return; }
1078 #endif
1079 #else
1080 #define BID_RETURN_VAL(x) { BID_OPT_RESTORE_BINARY_FLAGS() return(x); }
1081 #if BID_BIG_ENDIAN && defined BID_128RES
1082 #define BID_RETURN(x) { BID_OPT_RESTORE_BINARY_FLAGS() BID_SWAP128(x); return(x); }
1083 #define BID_RETURN_NOFLAGS(x) { BID_SWAP128(x); return(x); }
1084 #else
1085 #define BID_RETURN(x) { BID_OPT_RESTORE_BINARY_FLAGS() return(x); }
1086 #define BID_RETURN_NOFLAGS(x) { return(x); }
1087 #endif
1088 #endif
1089
1090 #if DECIMAL_CALL_BY_REFERENCE
1091 #define BIDECIMAL_CALL1(_FUNC, _RES, _OP1) \
1092 _FUNC(&(_RES), &(_OP1) _RND_MODE_ARG _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1093 #define BIDECIMAL_CALL1_NORND(_FUNC, _RES, _OP1) \
1094 _FUNC(&(_RES), &(_OP1) _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1095 #define BIDECIMAL_CALL2(_FUNC, _RES, _OP1, _OP2) \
1096 _FUNC(&(_RES), &(_OP1), &(_OP2) _RND_MODE_ARG _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1097 #define BIDECIMAL_CALL2_YPTR_NORND(_FUNC, _RES, _OP1, _OP2) \
1098 _FUNC(&(_RES), &(_OP1), &(_OP2) _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1099 #define BIDECIMAL_CALL2_NORND(_FUNC, _RES, _OP1, _OP2) \
1100 _FUNC(&(_RES), &(_OP1), &(_OP2) _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1101 #define BIDECIMAL_CALL1_NORND_RESREF(_FUNC, _RES, _OP1) \
1102 _FUNC((_RES), &(_OP1) _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1103 #define BIDECIMAL_CALL1_RESARG(_FUNC, _RES, _OP1) \
1104 _FUNC(&(_RES), (_OP1) _RND_MODE_ARG _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1105 #define BIDECIMAL_CALL1_RESREF(_FUNC, _RES, _OP1) \
1106 _FUNC((_RES), &(_OP1) _RND_MODE_ARG _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1107 #define BIDECIMAL_CALL1_NORND_NOSTAT(_FUNC, _RES, _OP1) \
1108 _FUNC(&(_RES), &(_OP1) _EXC_MASKS_ARG _EXC_INFO_ARG)
1109 #define BIDECIMAL_CALL2_NORND_NOSTAT(_FUNC, _RES, _OP1, _OP2) \
1110 _FUNC(&(_RES), &(_OP1), &(_OP2) _EXC_MASKS_ARG _EXC_INFO_ARG)
1111 #define BIDECIMAL_CALL3(_FUNC, _RES, _OP1, _OP2, _OP3) \
1112 _FUNC(&(_RES), &(_OP1), &(_OP2), &(_OP3) _RND_MODE_ARG _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1113 #define BIDECIMAL_CALL1_NORND_NOMASK_NOINFO(_FUNC, _RES, _OP1) \
1114 _FUNC(&(_RES), &(_OP1) _EXC_FLAGS_ARG )
1115 #define BIDECIMAL_CALL1_NORND_NOFLAGS_NOMASK_NOINFO(_FUNC, _RES, _OP1) \
1116 _FUNC(&(_RES), &(_OP1) )
1117 #define BIDECIMAL_CALL1_NORND_NOFLAGS_NOMASK_NOINFO_ARGREF(_FUNC, _RES, _OP1) \
1118 _FUNC(&(_RES), (_OP1) )
1119 #define BIDECIMAL_CALL2_NORND_NOFLAGS_NOMASK_NOINFO(_FUNC, _RES, _OP1, _OP2) \
1120 _FUNC(&(_RES), &(_OP1), &(_OP2) )
1121 #define BIDECIMAL_CALL2_NORND_NOFLAGS_NOMASK_NOINFO_ARG2REF(_FUNC, _RES, _OP1, _OP2) \
1122 _FUNC(&(_RES), &(_OP1), (_OP2) )
1123 #define BIDECIMAL_CALL1_NORND_NOMASK_NOINFO_RESVOID(_FUNC, _OP1) \
1124 _FUNC(&(_OP1) _EXC_FLAGS_ARG )
1125 #define BIDECIMAL_CALL2_NORND_NOMASK_NOINFO_RESVOID(_FUNC, _OP1, _OP2) \
1126 _FUNC(&(_OP1), &(_OP2) _EXC_FLAGS_ARG )
1127 #define BIDECIMAL_CALLV_NOFLAGS_NOMASK_NOINFO(_FUNC, _RES) \
1128 _FUNC(&(_RES) _RND_MODE_ARG)
1129 #define BIDECIMAL_CALL1_NOFLAGS_NOMASK_NOINFO(_FUNC, _RES, _OP1) \
1130 _FUNC(&(_OP1) _RND_MODE_ARG)
1131 #define BIDECIMAL_CALLV_EMPTY(_FUNC, _RES) \
1132 _FUNC(&(_RES))
1133 #else
1134 #define BIDECIMAL_CALL1(_FUNC, _RES, _OP1) \
1135 _RES = _FUNC((_OP1) _RND_MODE_ARG _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1136 #define BIDECIMAL_CALL1_NORND(_FUNC, _RES, _OP1) \
1137 _RES = _FUNC((_OP1) _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1138 #define BIDECIMAL_CALL2(_FUNC, _RES, _OP1, _OP2) \
1139 _RES = _FUNC((_OP1), (_OP2) _RND_MODE_ARG _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1140 #define BIDECIMAL_CALL2_YPTR_NORND(_FUNC, _RES, _OP1, _OP2) \
1141 _RES = _FUNC((_OP1), &(_OP2) _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1142 #define BIDECIMAL_CALL2_NORND(_FUNC, _RES, _OP1, _OP2) \
1143 _RES = _FUNC((_OP1), (_OP2) _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1144 #define BIDECIMAL_CALL1_NORND_RESREF(_FUNC, _RES, _OP1) \
1145 _FUNC((_RES), _OP1 _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1146 #define BIDECIMAL_CALL1_RESARG(_FUNC, _RES, _OP1) \
1147 _RES = _FUNC((_OP1) _RND_MODE_ARG _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1148 #define BIDECIMAL_CALL1_RESREF(_FUNC, _RES, _OP1) \
1149 _FUNC((_RES), _OP1 _RND_MODE_ARG _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1150 #define BIDECIMAL_CALL1_NORND_NOSTAT(_FUNC, _RES, _OP1) \
1151 _RES = _FUNC((_OP1) _EXC_MASKS_ARG _EXC_INFO_ARG)
1152 #define BIDECIMAL_CALL2_NORND_NOSTAT(_FUNC, _RES, _OP1, _OP2) \
1153 _RES = _FUNC((_OP1), (_OP2) _EXC_MASKS_ARG _EXC_INFO_ARG)
1154 #define BIDECIMAL_CALL3(_FUNC, _RES, _OP1, _OP2, _OP3) \
1155 _RES = _FUNC((_OP1), (_OP2), (_OP3) _RND_MODE_ARG _EXC_FLAGS_ARG _EXC_MASKS_ARG _EXC_INFO_ARG)
1156 #define BIDECIMAL_CALL1_NORND_NOMASK_NOINFO(_FUNC, _RES, _OP1) \
1157 _RES = _FUNC((_OP1) _EXC_FLAGS_ARG)
1158 #define BIDECIMAL_CALL1_NORND_NOFLAGS_NOMASK_NOINFO(_FUNC, _RES, _OP1) \
1159 _RES = _FUNC((_OP1) )
1160 #define BIDECIMAL_CALL1_NORND_NOFLAGS_NOMASK_NOINFO_ARGREF(_FUNC, _RES, _OP1) \
1161 _RES = _FUNC((_OP1) )
1162 #define BIDECIMAL_CALL2_NORND_NOFLAGS_NOMASK_NOINFO(_FUNC, _RES, _OP1, _OP2) \
1163 _RES = _FUNC((_OP1), (_OP2) )
1164 #define BIDECIMAL_CALL2_NORND_NOFLAGS_NOMASK_NOINFO_ARG2REF(_FUNC, _RES, _OP1, _OP2) \
1165 _RES = _FUNC((_OP1), (_OP2) )
1166 #define BIDECIMAL_CALL1_NORND_NOMASK_NOINFO_RESVOID(_FUNC, _OP1) \
1167 _FUNC((_OP1) _EXC_FLAGS_ARG)
1168 #define BIDECIMAL_CALL2_NORND_NOMASK_NOINFO_RESVOID(_FUNC, _OP1, _OP2) \
1169 _FUNC((_OP1), (_OP2) _EXC_FLAGS_ARG)
1170 #define BIDECIMAL_CALLV_NOFLAGS_NOMASK_NOINFO(_FUNC, _RES) \
1171 _RES = _FUNC(_RND_MODE_ARG_ALONE)
1172 #if !DECIMAL_GLOBAL_ROUNDING
1173 #define BIDECIMAL_CALL1_NOFLAGS_NOMASK_NOINFO(_FUNC, _RES, _OP1) \
1174 _RES = _FUNC((_OP1) _RND_MODE_ARG)
1175 #else
1176 #define BIDECIMAL_CALL1_NOFLAGS_NOMASK_NOINFO(_FUNC, _RES, _OP1) \
1177 _FUNC((_OP1) _RND_MODE_ARG)
1178 #endif
1179 #define BIDECIMAL_CALLV_EMPTY(_FUNC, _RES) \
1180 _RES=_FUNC()
1181 #endif
1182
1183
1184
1185 ///////////////////////////////////////////////////////////////////////////
1186 //
1187 // Wrapper macros for ICL
1188 //
1189 ///////////////////////////////////////////////////////////////////////////
1190
1191 #if defined (__INTEL_COMPILER) && (__DFP_WRAPPERS_ON) && (!DECIMAL_CALL_BY_REFERENCE) && (DECIMAL_GLOBAL_ROUNDING) && (DECIMAL_GLOBAL_EXCEPTION_FLAGS)
1192
1193 #include "bid_wrap_names.h"
1194
1195 #define DECLSPEC_OPT __declspec(noinline)
1196
1197 #define bit_size_BID_UINT128 128
1198 #define bit_size_BID_UINT64 64
1199 #define bit_size_BID_SINT64 64
1200 #define bit_size_BID_UINT32 32
1201 #define bit_size_BID_SINT32 32
1202
1203 #define bidsize(x) bit_size_##x
1204
1205 #define form_type(type, size) type##size
1206
1207 #define wrapper_name(x) __wrap_##x
1208
1209 #define DFP_WRAPFN_OTHERTYPE(rsize, fn_name, othertype)\
1210 form_type(_Decimal,rsize) wrapper_name(fn_name) (othertype __wraparg1)\
1211 {\
1212 union {\
1213 form_type(_Decimal, rsize) d;\
1214 form_type(BID_UINT, rsize) i;\
1215 } r;\
1216 \
1217 \
1218 r.i = fn_name(__wraparg1);\
1219 return r.d;\
1220 }
1221
1222 #define DFP_WRAPFN_DFP(rsize, fn_name, isize1)\
1223 form_type(_Decimal,rsize) wrapper_name(fn_name) (form_type(_Decimal, isize1) __wraparg1)\
1224 {\
1225 union {\
1226 form_type(_Decimal, rsize) d;\
1227 form_type(BID_UINT, rsize) i;\
1228 } r;\
1229 \
1230 union {\
1231 form_type(_Decimal, isize1) d;\
1232 form_type(BID_UINT, isize1) i;\
1233 } in1 = { __wraparg1};\
1234 \
1235 \
1236 r.i = fn_name(in1.i);\
1237 \
1238 return r.d;\
1239 }
1240
1241 #define DFP_WRAPFN_DFP_DFP(rsize, fn_name, isize1, isize2)\
1242 form_type(_Decimal, rsize) wrapper_name(fn_name) (form_type(_Decimal, isize1) __wraparg1, form_type(_Decimal, isize2) __wraparg2)\
1243 {\
1244 union {\
1245 form_type(_Decimal, rsize) d;\
1246 form_type(BID_UINT, rsize) i;\
1247 } r;\
1248 \
1249 union {\
1250 form_type(_Decimal, isize1) d;\
1251 form_type(BID_UINT, isize1) i;\
1252 } in1 = { __wraparg1};\
1253 \
1254 union {\
1255 form_type(_Decimal, isize2) d;\
1256 form_type(BID_UINT, isize2) i;\
1257 } in2 = { __wraparg2};\
1258 \
1259 \
1260 r.i = fn_name(in1.i, in2.i);\
1261 \
1262 return r.d;\
1263 }
1264
1265 #define DFP_WRAPFN_DFP_DFP_POINTER(rsize, fn_name, isize1, isize2)\
1266 form_type(_Decimal, rsize) wrapper_name(fn_name) (form_type(_Decimal, isize1) __wraparg1, form_type(_Decimal, isize2) *__wraparg2)\
1267 {\
1268 union {\
1269 form_type(_Decimal, rsize) d;\
1270 form_type(BID_UINT, rsize) i;\
1271 } r;\
1272 \
1273 union {\
1274 form_type(_Decimal, isize1) d;\
1275 form_type(BID_UINT, isize1) i;\
1276 } in1 = { __wraparg1};\
1277 \
1278 union {\
1279 form_type(_Decimal, isize2) d;\
1280 form_type(BID_UINT, isize2) i;\
1281 } out2;\
1282 \
1283 \
1284 r.i = fn_name(in1.i, &out2.i); *__wraparg2 = out2.d;\
1285 \
1286 return r.d;\
1287 }
1288
1289 #define DFP_WRAPFN_DFP_DFP_DFP(rsize, fn_name, isize1, isize2, isize3)\
1290 form_type(_Decimal, rsize) wrapper_name(fn_name) (form_type(_Decimal, isize1) __wraparg1, form_type(_Decimal, isize2) __wraparg2, form_type(_Decimal, isize3) __wraparg3)\
1291 {\
1292 union {\
1293 form_type(_Decimal, rsize) d;\
1294 form_type(BID_UINT, rsize) i;\
1295 } r;\
1296 \
1297 union {\
1298 form_type(_Decimal, isize1) d;\
1299 form_type(BID_UINT, isize1) i;\
1300 } in1 = { __wraparg1};\
1301 \
1302 union {\
1303 form_type(_Decimal, isize2) d;\
1304 form_type(BID_UINT, isize2) i;\
1305 } in2 = { __wraparg2};\
1306 \
1307 union {\
1308 form_type(_Decimal, isize3) d;\
1309 form_type(BID_UINT, isize3) i;\
1310 } in3 = { __wraparg3};\
1311 \
1312 \
1313 r.i = fn_name(in1.i, in2.i, in3.i);\
1314 \
1315 return r.d;\
1316 }
1317
1318 #define RES_WRAPFN_DFP(restype, fn_name, isize1)\
1319 restype wrapper_name(fn_name) (form_type(_Decimal, isize1) __wraparg1)\
1320 {\
1321 union {\
1322 form_type(_Decimal, isize1) d;\
1323 form_type(BID_UINT, isize1) i;\
1324 } in1 = { __wraparg1};\
1325 \
1326 \
1327 return fn_name(in1.i);\
1328 }
1329
1330 #define RES_WRAPFN_DFP_DFP(restype, fn_name, isize1, isize2)\
1331 restype wrapper_name(fn_name) (form_type(_Decimal, isize1) __wraparg1, form_type(_Decimal, isize2) __wraparg2)\
1332 {\
1333 union {\
1334 form_type(_Decimal, isize1) d;\
1335 form_type(BID_UINT, isize1) i;\
1336 } in1 = { __wraparg1};\
1337 \
1338 union {\
1339 form_type(_Decimal, isize2) d;\
1340 form_type(BID_UINT, isize2) i;\
1341 } in2 = { __wraparg2};\
1342 \
1343 \
1344 return fn_name(in1.i, in2.i);\
1345 }
1346
1347 #define DFP_WRAPFN_DFP_OTHERTYPE(rsize, fn_name, isize1, othertype)\
1348 form_type(_Decimal, rsize) wrapper_name(fn_name) (form_type(_Decimal, isize1) __wraparg1, othertype __wraparg2)\
1349 {\
1350 union {\
1351 form_type(_Decimal, rsize) d;\
1352 form_type(BID_UINT, rsize) i;\
1353 } r;\
1354 \
1355 union {\
1356 form_type(_Decimal, isize1) d;\
1357 form_type(BID_UINT, isize1) i;\
1358 } in1 = { __wraparg1};\
1359 \
1360 \
1361 r.i = fn_name(in1.i, __wraparg2);\
1362 \
1363 return r.d;\
1364 }
1365
1366 #define VOID_WRAPFN_OTHERTYPERES_DFP(fn_name, othertype, isize1)\
1367 void wrapper_name(fn_name) (othertype *__wrapres, form_type(_Decimal, isize1) __wraparg1)\
1368 {\
1369 union {\
1370 form_type(_Decimal, isize1) d;\
1371 form_type(BID_UINT, isize1) i;\
1372 } in1 = { __wraparg1};\
1373 \
1374 \
1375 fn_name(__wrapres, in1.i);\
1376 \
1377 }
1378
1379 #define DFP_WRAPFN_TYPE1_TYPE2(rsize, fn_name, type1, type2)\
1380 form_type(_Decimal, rsize) wrapper_name(fn_name) (type1 __wraparg1, type2 __wraparg2)\
1381 {\
1382 union {\
1383 form_type(_Decimal, rsize) d;\
1384 form_type(BID_UINT, rsize) i;\
1385 } r;\
1386 \
1387 \
1388 r.i = fn_name(__wraparg1, __wraparg2);\
1389 \
1390 return r.d;\
1391 }
1392
1393 #else
1394
1395 #define DECLSPEC_OPT
1396
1397 #define DFP_WRAPFN_OTHERTYPE(rsize, fn_name, othertype)
1398 #define DFP_WRAPFN_DFP(rsize, fn_name, isize1)
1399 #define DFP_WRAPFN_DFP_DFP(rsize, fn_name, isize1, isize2)
1400 #define RES_WRAPFN_DFP(rsize, fn_name, isize1)
1401 #define RES_WRAPFN_DFP_DFP(rsize, fn_name, isize1, isize2)
1402 #define DFP_WRAPFN_DFP_DFP_DFP(rsize, fn_name, isize1, isize2, isize3)
1403 #define DFP_WRAPFN_DFP_OTHERTYPE(rsize, fn_name, isize1, othertype)
1404 #define DFP_WRAPFN_DFP_DFP_POINTER(rsize, fn_name, isize1, isize2)
1405 #define VOID_WRAPFN_OTHERTYPERES_DFP(fn_name, othertype, isize1)
1406 #define DFP_WRAPFN_TYPE1_TYPE2(rsize, fn_name, type1, type2)
1407
1408 #endif
1409
1410
1411 ///////////////////////////////////////////////////////////////////////////
1412
1413 #if BID_BIG_ENDIAN
1414 #define BID_HIGH_128W 0
1415 #define BID_LOW_128W 1
1416 #else
1417 #define BID_HIGH_128W 1
1418 #define BID_LOW_128W 0
1419 #endif
1420
1421 #if (BID_BIG_ENDIAN) && defined(BID_128RES)
1422 #define BID_COPY_ARG_REF(arg_name) \
1423 BID_UINT128 arg_name={{ pbid_##arg_name->w[1], pbid_##arg_name->w[0]}};
1424 #define BID_COPY_ARG_VAL(arg_name) \
1425 BID_UINT128 arg_name={{ bid_##arg_name.w[1], bid_##arg_name.w[0]}};
1426 #else
1427 #define BID_COPY_ARG_REF(arg_name) \
1428 BID_UINT128 arg_name=*pbid_##arg_name;
1429 #define BID_COPY_ARG_VAL(arg_name) \
1430 BID_UINT128 arg_name= bid_##arg_name;
1431 #endif
1432
1433 #define BID_COPY_ARG_TYPE_REF(type, arg_name) \
1434 type arg_name=*pbid_##arg_name;
1435 #define BID_COPY_ARG_TYPE_VAL(type, arg_name) \
1436 type arg_name= bid_##arg_name;
1437
1438 #if !DECIMAL_GLOBAL_ROUNDING
1439 #define BID_SET_RND_MODE() \
1440 _IDEC_round rnd_mode = *prnd_mode;
1441 #else
1442 #define BID_SET_RND_MODE()
1443 #endif
1444
1445 #if !defined(BID_MS_FLAGS) && (defined(_MSC_VER) && !defined(__INTEL_COMPILER))
1446 # define BID_MS_FLAGS
1447 #endif
1448
1449 #if (defined(_MSC_VER) && !defined(__INTEL_COMPILER))
1450 # include <math.h> // needed for MS build of some BID32 transcendentals (hypot)
1451 #endif
1452
1453
1454
1455 #if defined (UNCHANGED_BINARY_STATUS_FLAGS) && defined (BID_FUNCTION_SETS_BINARY_FLAGS)
1456 # if defined( BID_MS_FLAGS )
1457
1458 # include <float.h>
1459
1460 extern unsigned int __bid_ms_restore_flags(unsigned int*);
1461
1462 # define BID_OPT_FLAG_DECLARE() \
1463 unsigned int binaryflags = 0;
1464 # define BID_OPT_SAVE_BINARY_FLAGS() \
1465 binaryflags = _statusfp();
1466 # define BID_OPT_RESTORE_BINARY_FLAGS() \
1467 __bid_ms_restore_flags(&binaryflags);
1468
1469 # else
1470 # include <fenv.h>
1471 # define BID_FE_ALL_FLAGS FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT
1472 # define BID_OPT_FLAG_DECLARE() \
1473 fexcept_t binaryflags = 0;
1474 # define BID_OPT_SAVE_BINARY_FLAGS() \
1475 (void) fegetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);
1476 # define BID_OPT_RESTORE_BINARY_FLAGS() \
1477 (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);
1478 # endif
1479 #else
1480 # define BID_OPT_FLAG_DECLARE()
1481 # define BID_OPT_SAVE_BINARY_FLAGS()
1482 # define BID_OPT_RESTORE_BINARY_FLAGS()
1483 #endif
1484
1485 #define BID_PROLOG_REF(arg_name) \
1486 BID_COPY_ARG_REF(arg_name)
1487
1488 #define BID_PROLOG_VAL(arg_name) \
1489 BID_COPY_ARG_VAL(arg_name)
1490
1491 #define BID_PROLOG_TYPE_REF(type, arg_name) \
1492 BID_COPY_ARG_TYPE_REF(type, arg_name)
1493
1494 #define BID_PROLOG_TYPE_VAL(type, arg_name) \
1495 BID_COPY_ARG_TYPE_VAL(type, arg_name)
1496
1497 #define OTHER_BID_PROLOG_REF() BID_OPT_FLAG_DECLARE()
1498 #define OTHER_BID_PROLOG_VAL() BID_OPT_FLAG_DECLARE()
1499
1500 #if DECIMAL_CALL_BY_REFERENCE
1501 #define BID128_FUNCTION_ARG1(fn_name, arg_name)\
1502 void fn_name (BID_UINT128 * pres, \
1503 BID_UINT128 * \
1504 pbid_##arg_name _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1505 _EXC_INFO_PARAM) {\
1506 BID_PROLOG_REF(arg_name) \
1507 BID_SET_RND_MODE() \
1508 OTHER_BID_PROLOG_REF()
1509
1510 #define BID128_FUNCTION_ARG1_NORND(fn_name, arg_name)\
1511 void fn_name (BID_UINT128 * pres, \
1512 BID_UINT128 * \
1513 pbid_##arg_name _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1514 _EXC_INFO_PARAM) {\
1515 BID_PROLOG_REF(arg_name) \
1516 OTHER_BID_PROLOG_REF()
1517
1518 #define BID128_FUNCTION_ARG1_NORND_CUSTOMRESTYPE(restype, fn_name, arg_name)\
1519 void fn_name (restype * pres, \
1520 BID_UINT128 * \
1521 pbid_##arg_name _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1522 _EXC_INFO_PARAM) {\
1523 BID_PROLOG_REF(arg_name) \
1524 OTHER_BID_PROLOG_REF()
1525
1526 #define BID128_FUNCTION_ARG2(fn_name, arg_name1, arg_name2)\
1527 void fn_name (BID_UINT128 * pres, \
1528 BID_UINT128 *pbid_##arg_name1, BID_UINT128 *pbid_##arg_name2 \
1529 _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1530 _EXC_INFO_PARAM) {\
1531 BID_PROLOG_REF(arg_name1) \
1532 BID_PROLOG_REF(arg_name2) \
1533 BID_SET_RND_MODE() \
1534 OTHER_BID_PROLOG_REF()
1535
1536 #define BID128_FUNCTION_ARG2_NORND(fn_name, arg_name1, arg_name2)\
1537 void fn_name (BID_UINT128 * pres, \
1538 BID_UINT128 *pbid_##arg_name1, BID_UINT128 *pbid_##arg_name2 \
1539 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1540 _EXC_INFO_PARAM) {\
1541 BID_PROLOG_REF(arg_name1) \
1542 BID_PROLOG_REF(arg_name2) \
1543 OTHER_BID_PROLOG_REF()
1544
1545 #define BID128_FUNCTION_ARG2_NORND_CUSTOMRESTYPE(restype, fn_name, arg_name1, arg_name2)\
1546 void fn_name (restype * pres, \
1547 BID_UINT128 *pbid_##arg_name1, BID_UINT128 *pbid_##arg_name2 \
1548 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1549 _EXC_INFO_PARAM) {\
1550 BID_PROLOG_REF(arg_name1) \
1551 BID_PROLOG_REF(arg_name2) \
1552 OTHER_BID_PROLOG_REF()
1553
1554 #define BID128_FUNCTION_ARG2P_NORND_CUSTOMRESTYPE(restype, fn_name, arg_name1, arg_name2)\
1555 void fn_name (restype * pres, \
1556 BID_UINT128 *pbid_##arg_name1, BID_UINT128 *arg_name2 \
1557 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1558 _EXC_INFO_PARAM) {\
1559 BID_PROLOG_REF(arg_name1) \
1560 OTHER_BID_PROLOG_REF()
1561
1562 #define BID128_FUNCTION_ARG3P_NORND_CUSTOMRESTYPE(restype, fn_name, arg_name1, arg_name2, res_name3)\
1563 void fn_name (restype * pres, \
1564 BID_UINT128 *pbid_##arg_name1, BID_UINT128 *pbid_##arg_name2, BID_UINT128 *res_name3 \
1565 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1566 _EXC_INFO_PARAM) {\
1567 BID_PROLOG_REF(arg_name1) \
1568 BID_PROLOG_REF(arg_name2) \
1569 OTHER_BID_PROLOG_REF()
1570
1571 #define BID128_FUNCTION_ARG128_ARGTYPE2(fn_name, arg_name1, type2, arg_name2)\
1572 void fn_name (BID_UINT128 * pres, \
1573 BID_UINT128 *pbid_##arg_name1, type2 *pbid_##arg_name2 \
1574 _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1575 _EXC_INFO_PARAM) {\
1576 BID_PROLOG_REF(arg_name1) \
1577 BID_PROLOG_TYPE_REF(type2, arg_name2) \
1578 BID_SET_RND_MODE() \
1579 OTHER_BID_PROLOG_REF()
1580
1581 #define BID128_FUNCTION_ARG128_CUSTOMARGTYPE2(fn_name, arg_name1, type2, arg_name2) BID128_FUNCTION_ARG128_ARGTYPE2(fn_name, arg_name1, type2, arg_name2)
1582
1583 #define BID128_FUNCTION_ARG128_CUSTOMARGTYPE2_PLAIN(fn_name, arg_name1, type2, arg_name2)\
1584 void fn_name (BID_UINT128 * pres, \
1585 BID_UINT128 *pbid_##arg_name1, type2 arg_name2 \
1586 ) {\
1587 BID_PROLOG_REF(arg_name1) \
1588 OTHER_BID_PROLOG_REF()
1589
1590 #define BID_TYPE0_FUNCTION_ARGTYPE1_ARGTYPE2(type0, fn_name, type1, arg_name1, type2, arg_name2)\
1591 void fn_name (type0 *pres, \
1592 type1 *pbid_##arg_name1, type2 *pbid_##arg_name2 \
1593 _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1594 _EXC_INFO_PARAM) {\
1595 BID_PROLOG_TYPE_REF(type1, arg_name1) \
1596 BID_PROLOG_TYPE_REF(type2, arg_name2) \
1597 BID_SET_RND_MODE() \
1598 OTHER_BID_PROLOG_REF()
1599
1600 #define BID_TYPE0_FUNCTION_ARGTYPE1_OTHER_ARGTYPE2 BID_TYPE0_FUNCTION_ARGTYPE1_ARGTYPE2
1601
1602 #define BID_TYPE0_FUNCTION_ARGTYPE1_ARGTYPE2_ARGTYPE3(type0, fn_name, type1, arg_name1, type2, arg_name2, type3, arg_name3)\
1603 void fn_name (type0 *pres, \
1604 type1 *pbid_##arg_name1, type2 *pbid_##arg_name2, type3 *pbid_##arg_name3 \
1605 _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1606 _EXC_INFO_PARAM) {\
1607 BID_PROLOG_TYPE_REF(type1, arg_name1) \
1608 BID_PROLOG_TYPE_REF(type2, arg_name2) \
1609 BID_PROLOG_TYPE_REF(type3, arg_name3) \
1610 BID_SET_RND_MODE() \
1611 OTHER_BID_PROLOG_REF()
1612
1613 #define BID_TYPE_FUNCTION_ARG2(type0, fn_name, arg_name1, arg_name2)\
1614 void fn_name (type0 *pres, \
1615 type0 *pbid_##arg_name1, type0 *pbid_##arg_name2 \
1616 _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1617 _EXC_INFO_PARAM) {\
1618 BID_PROLOG_TYPE_REF(type0, arg_name1) \
1619 BID_PROLOG_TYPE_REF(type0, arg_name2) \
1620 BID_SET_RND_MODE() \
1621 OTHER_BID_PROLOG_REF()
1622
1623 #define BID_TYPE_FUNCTION_ARG2_CUSTOMRESULT_NORND(typeres, fn_name, type0, arg_name1, arg_name2)\
1624 void fn_name (typeres *pres, \
1625 type0 *pbid_##arg_name1, type0 *pbid_##arg_name2 \
1626 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1627 _EXC_INFO_PARAM) {\
1628 BID_PROLOG_TYPE_REF(type0, arg_name1) \
1629 BID_PROLOG_TYPE_REF(type0, arg_name2) \
1630 OTHER_BID_PROLOG_REF()
1631
1632 #define BID_TYPE_FUNCTION_ARG1(type0, fn_name, arg_name1)\
1633 void fn_name (type0 *pres, \
1634 type0 *pbid_##arg_name1 \
1635 _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1636 _EXC_INFO_PARAM) {\
1637 BID_PROLOG_TYPE_REF(type0, arg_name1) \
1638 BID_SET_RND_MODE() \
1639 OTHER_BID_PROLOG_REF()
1640
1641 #define BID128_FUNCTION_ARGTYPE1_ARG128(fn_name, type1, arg_name1, arg_name2)\
1642 void fn_name (BID_UINT128 * pres, \
1643 type1 *pbid_##arg_name1, BID_UINT128 *pbid_##arg_name2 \
1644 _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1645 _EXC_INFO_PARAM) {\
1646 BID_PROLOG_TYPE_REF(type1, arg_name1) \
1647 BID_PROLOG_REF(arg_name2) \
1648 BID_SET_RND_MODE() \
1649 OTHER_BID_PROLOG_REF()
1650
1651 #define BID_TYPE0_FUNCTION_ARG128_ARGTYPE2(type0, fn_name, arg_name1, type2, arg_name2)\
1652 void fn_name (type0 *pres, \
1653 BID_UINT128 *pbid_##arg_name1, type2 *pbid_##arg_name2 \
1654 _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1655 _EXC_INFO_PARAM) {\
1656 BID_PROLOG_REF(arg_name1) \
1657 BID_PROLOG_TYPE_REF(type2, arg_name2) \
1658 BID_SET_RND_MODE() \
1659 OTHER_BID_PROLOG_REF()
1660
1661 #define BID_TYPE0_FUNCTION_ARGTYPE1_ARG128(type0, fn_name, type1, arg_name1, arg_name2)\
1662 void fn_name (type0 *pres, \
1663 type1 *pbid_##arg_name1, BID_UINT128 *pbid_##arg_name2 \
1664 _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1665 _EXC_INFO_PARAM) {\
1666 BID_PROLOG_TYPE_REF(type1, arg_name1) \
1667 BID_PROLOG_REF(arg_name2) \
1668 BID_SET_RND_MODE() \
1669 OTHER_BID_PROLOG_REF()
1670
1671 #define BID_TYPE0_FUNCTION_ARG128_ARG128(type0, fn_name, arg_name1, arg_name2)\
1672 void fn_name (type0 * pres, \
1673 BID_UINT128 *pbid_##arg_name1, BID_UINT128 *pbid_##arg_name2 \
1674 _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1675 _EXC_INFO_PARAM) {\
1676 BID_PROLOG_REF(arg_name1) \
1677 BID_PROLOG_REF(arg_name2) \
1678 BID_SET_RND_MODE() \
1679 OTHER_BID_PROLOG_REF()
1680
1681 #define BID_TYPE0_FUNCTION_ARG1(type0, fn_name, arg_name)\
1682 void fn_name (type0 * pres, \
1683 BID_UINT128 * \
1684 pbid_##arg_name _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1685 _EXC_INFO_PARAM) {\
1686 BID_PROLOG_REF(arg_name) \
1687 BID_SET_RND_MODE() \
1688 OTHER_BID_PROLOG_REF()
1689
1690 #define BID128_FUNCTION_ARGTYPE1(fn_name, type1, arg_name)\
1691 void fn_name (BID_UINT128 * pres, \
1692 type1 * \
1693 pbid_##arg_name _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1694 _EXC_INFO_PARAM) {\
1695 BID_PROLOG_TYPE_REF(type1, arg_name) \
1696 BID_SET_RND_MODE() \
1697 OTHER_BID_PROLOG_REF()
1698
1699 #define BID_TYPE0_FUNCTION_ARGTYPE1(type0, fn_name, type1, arg_name)\
1700 void fn_name (type0 * pres, \
1701 type1 * \
1702 pbid_##arg_name _RND_MODE_PARAM _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1703 _EXC_INFO_PARAM) {\
1704 BID_PROLOG_TYPE_REF(type1, arg_name) \
1705 BID_SET_RND_MODE() \
1706 OTHER_BID_PROLOG_REF()
1707
1708 #define BID_RESTYPE0_FUNCTION_ARGTYPE1 BID_TYPE0_FUNCTION_ARGTYPE1
1709
1710 #define BID_TYPE0_FUNCTION_ARGTYPE1_NORND(type0, fn_name, type1, arg_name)\
1711 void fn_name (type0 * pres, \
1712 type1 * \
1713 pbid_##arg_name _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1714 _EXC_INFO_PARAM) {\
1715 BID_PROLOG_TYPE_REF(type1, arg_name) \
1716 OTHER_BID_PROLOG_REF()
1717
1718 #define BID_TYPE0_FUNCTION_ARGTYPE1_NORND_DFP BID_TYPE0_FUNCTION_ARGTYPE1_NORND
1719
1720 #define BID_TYPE0_FUNCTION_ARGTYPE1_NORND_NOFLAGS(type0, fn_name, type1, arg_name)\
1721 void fn_name (type0 * pres, \
1722 type1 * \
1723 pbid_##arg_name _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1724 _EXC_INFO_PARAM) {\
1725 BID_PROLOG_TYPE_REF(type1, arg_name)
1726
1727 #define BID_TYPE0_FUNCTION_ARGTYPE1_ARGTYPE2_NORND(type0, fn_name, type1, arg_name1, type2, arg_name2)\
1728 void fn_name (type0 * pres, \
1729 type1 * \
1730 pbid_##arg_name1, type2 * pbid_##arg_name2 _EXC_FLAGS_PARAM _EXC_MASKS_PARAM \
1731 _EXC_INFO_PARAM) {\
1732 BID_PROLOG_TYPE_REF(type1, arg_name1) \
1733 BID_PROLOG_TYPE_REF(type2, arg_name2) \
1734 OTHER_BID_PROLOG_REF()
1735 //////////////////////////////////////////
1736 /////////////////////////////////////////
1737 ////////////////////////////////////////
1738
1739 #else
1740
1741 //////////////////////////////////////////
1742 /////////////////////////////////////////
1743 ////////////////////////////////////////
1744
1745 // BID args and result
1746 #define BID128_FUNCTION_ARG1(fn_name, arg_name)\
1747 DFP_WRAPFN_DFP(128, fn_name, 128); \
1748 \
1749 DECLSPEC_OPT BID_UINT128 \
1750 fn_name (BID_UINT128 bid_##arg_name _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1751 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1752 BID_PROLOG_VAL(arg_name) \
1753 OTHER_BID_PROLOG_VAL()
1754
1755 // BID args and result
1756 #define BID128_FUNCTION_ARG1_NORND(fn_name, arg_name)\
1757 DFP_WRAPFN_DFP(128, fn_name, 128); \
1758 DECLSPEC_OPT BID_UINT128 \
1759 fn_name (BID_UINT128 bid_##arg_name _EXC_FLAGS_PARAM \
1760 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1761 BID_PROLOG_VAL(arg_name) \
1762 OTHER_BID_PROLOG_VAL()
1763
1764 // result is not BID type
1765 #define BID128_FUNCTION_ARG1_NORND_CUSTOMRESTYPE(restype, fn_name, arg_name)\
1766 RES_WRAPFN_DFP(restype, fn_name, 128); \
1767 DECLSPEC_OPT restype \
1768 fn_name (BID_UINT128 bid_##arg_name _EXC_FLAGS_PARAM \
1769 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1770 BID_PROLOG_VAL(arg_name) \
1771 OTHER_BID_PROLOG_VAL()
1772
1773 // BID args and result
1774 #define BID128_FUNCTION_ARG2(fn_name, arg_name1, arg_name2)\
1775 DFP_WRAPFN_DFP_DFP(128, fn_name, 128, 128); \
1776 \
1777 DECLSPEC_OPT BID_UINT128 \
1778 fn_name (BID_UINT128 bid_##arg_name1, \
1779 BID_UINT128 bid_##arg_name2 _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1780 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1781 BID_PROLOG_VAL(arg_name1) \
1782 BID_PROLOG_VAL(arg_name2) \
1783 OTHER_BID_PROLOG_VAL()
1784
1785 // fmod, rem
1786 #define BID128_FUNCTION_ARG2_NORND(fn_name, arg_name1, arg_name2)\
1787 DFP_WRAPFN_DFP_DFP(128, fn_name, 128, 128); \
1788 \
1789 DECLSPEC_OPT BID_UINT128 \
1790 fn_name (BID_UINT128 bid_##arg_name1, \
1791 BID_UINT128 bid_##arg_name2 _EXC_FLAGS_PARAM \
1792 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1793 BID_PROLOG_VAL(arg_name1) \
1794 BID_PROLOG_VAL(arg_name2) \
1795 OTHER_BID_PROLOG_VAL()
1796
1797 // compares
1798 #define BID128_FUNCTION_ARG2_NORND_CUSTOMRESTYPE(restype, fn_name, arg_name1, arg_name2)\
1799 RES_WRAPFN_DFP_DFP(restype, fn_name, 128, 128); \
1800 DECLSPEC_OPT restype \
1801 fn_name (BID_UINT128 bid_##arg_name1, \
1802 BID_UINT128 bid_##arg_name2 _EXC_FLAGS_PARAM \
1803 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1804 BID_PROLOG_VAL(arg_name1) \
1805 BID_PROLOG_VAL(arg_name2) \
1806 OTHER_BID_PROLOG_VAL()
1807
1808 // not currently used
1809 #define BID128_FUNCTION_ARG2P_NORND_CUSTOMRESTYPE(restype, fn_name, arg_name1, res_name2)\
1810 RES_WRAPFN_DFP_DFP(restype, fn_name, 128, 128); \
1811 DECLSPEC_OPT restype \
1812 fn_name (BID_UINT128 bid_##arg_name1, \
1813 BID_UINT128* res_name2 _EXC_FLAGS_PARAM \
1814 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1815 BID_PROLOG_VAL(arg_name1) \
1816 OTHER_BID_PROLOG_VAL()
1817
1818 // not currently used
1819 #define BID128_FUNCTION_ARG3P_NORND_CUSTOMRESTYPE(restype, fn_name, arg_name1, arg_name2, res_name3)\
1820 RES_WRAPFN_DFP_DFP_DFP(restype, fn_name, 128, 128, 128); \
1821 DECLSPEC_OPT restype \
1822 fn_name (BID_UINT128 bid_##arg_name1, \
1823 BID_UINT128 bid_##arg_name2, BID_UINT128* res_name3 _EXC_FLAGS_PARAM \
1824 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1825 BID_PROLOG_VAL(arg_name1) \
1826 BID_PROLOG_VAL(arg_name2) \
1827 OTHER_BID_PROLOG_VAL()
1828
1829 // BID args and result
1830 #define BID128_FUNCTION_ARG128_ARGTYPE2(fn_name, arg_name1, type2, arg_name2)\
1831 DFP_WRAPFN_DFP_DFP(128, fn_name, 128, bidsize(type2)); \
1832 DECLSPEC_OPT BID_UINT128 \
1833 fn_name (BID_UINT128 bid_##arg_name1, \
1834 type2 bid_##arg_name2 _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1835 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1836 BID_PROLOG_VAL(arg_name1) \
1837 BID_PROLOG_TYPE_VAL(type2, arg_name2) \
1838 OTHER_BID_PROLOG_VAL()
1839
1840 // scalb, ldexp
1841 #define BID128_FUNCTION_ARG128_CUSTOMARGTYPE2(fn_name, arg_name1, type2, arg_name2)\
1842 DFP_WRAPFN_DFP_OTHERTYPE(128, fn_name, 128, type2); \
1843 DECLSPEC_OPT BID_UINT128 \
1844 fn_name (BID_UINT128 bid_##arg_name1, \
1845 type2 bid_##arg_name2 _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1846 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1847 BID_PROLOG_VAL(arg_name1) \
1848 BID_PROLOG_TYPE_VAL(type2, arg_name2) \
1849 OTHER_BID_PROLOG_VAL()
1850
1851 // frexp
1852 #define BID128_FUNCTION_ARG128_CUSTOMARGTYPE2_PLAIN(fn_name, arg_name1, type2, arg_name2)\
1853 DFP_WRAPFN_DFP_OTHERTYPE(128, fn_name, 128, type2); \
1854 DECLSPEC_OPT BID_UINT128 \
1855 fn_name (BID_UINT128 bid_##arg_name1, \
1856 type2 arg_name2 \
1857 ) { \
1858 BID_PROLOG_VAL(arg_name1) \
1859 OTHER_BID_PROLOG_VAL()
1860
1861 // BID args and result
1862 #define BID_TYPE0_FUNCTION_ARGTYPE1_ARGTYPE2(type0, fn_name, type1, arg_name1, type2, arg_name2)\
1863 DFP_WRAPFN_DFP_DFP(bidsize(type0), fn_name, bidsize(type1), bidsize(type2)); \
1864 DECLSPEC_OPT type0 \
1865 fn_name (type1 bid_##arg_name1, \
1866 type2 bid_##arg_name2 _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1867 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1868 BID_PROLOG_TYPE_VAL(type1, arg_name1) \
1869 BID_PROLOG_TYPE_VAL(type2, arg_name2) \
1870 OTHER_BID_PROLOG_VAL()
1871
1872 // BID arg1 and result
1873 #define BID_TYPE0_FUNCTION_ARGTYPE1_OTHER_ARGTYPE2(type0, fn_name, type1, arg_name1, type2, arg_name2)\
1874 DFP_WRAPFN_DFP_OTHERTYPE(bidsize(type0), fn_name, bidsize(type1), type2); \
1875 DECLSPEC_OPT type0 \
1876 fn_name (type1 bid_##arg_name1, \
1877 type2 bid_##arg_name2 _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1878 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1879 BID_PROLOG_TYPE_VAL(type1, arg_name1) \
1880 BID_PROLOG_TYPE_VAL(type2, arg_name2) \
1881 OTHER_BID_PROLOG_VAL()
1882
1883 // BID args and result
1884 #define BID_TYPE0_FUNCTION_ARGTYPE1_ARGTYPE2_ARGTYPE3(type0, fn_name, type1, arg_name1, type2, arg_name2, type3, arg_name3)\
1885 DFP_WRAPFN_DFP_DFP_DFP(bidsize(type0), fn_name, bidsize(type1), bidsize(type2), bidsize(type3)); \
1886 DECLSPEC_OPT type0 \
1887 fn_name (type1 bid_##arg_name1, \
1888 type2 bid_##arg_name2, type3 bid_##arg_name3 _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1889 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1890 BID_PROLOG_TYPE_VAL(type1, arg_name1) \
1891 BID_PROLOG_TYPE_VAL(type2, arg_name2) \
1892 BID_PROLOG_TYPE_VAL(type3, arg_name3) \
1893 OTHER_BID_PROLOG_VAL()
1894
1895 // BID args and result
1896 #define BID_TYPE_FUNCTION_ARG2(type0, fn_name, arg_name1, arg_name2)\
1897 DFP_WRAPFN_DFP_DFP(bidsize(type0), fn_name, bidsize(type0), bidsize(type0)); \
1898 DECLSPEC_OPT type0 \
1899 fn_name (type0 bid_##arg_name1, \
1900 type0 bid_##arg_name2 _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1901 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1902 BID_PROLOG_TYPE_VAL(type0, arg_name1) \
1903 BID_PROLOG_TYPE_VAL(type0, arg_name2) \
1904 OTHER_BID_PROLOG_VAL()
1905
1906 // BID args, result a different type (e.g. for compares)
1907 #define BID_TYPE_FUNCTION_ARG2_CUSTOMRESULT_NORND(typeres, fn_name, type0, arg_name1, arg_name2)\
1908 RES_WRAPFN_DFP_DFP(typeres, fn_name, bidsize(type0), bidsize(type0)); \
1909 DECLSPEC_OPT typeres \
1910 fn_name (type0 bid_##arg_name1, \
1911 type0 bid_##arg_name2 _EXC_FLAGS_PARAM \
1912 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1913 BID_PROLOG_TYPE_VAL(type0, arg_name1) \
1914 BID_PROLOG_TYPE_VAL(type0, arg_name2) \
1915 OTHER_BID_PROLOG_VAL()
1916
1917 // BID args and result
1918 #define BID_TYPE_FUNCTION_ARG1(type0, fn_name, arg_name1)\
1919 DFP_WRAPFN_DFP(bidsize(type0), fn_name, bidsize(type0)); \
1920 DECLSPEC_OPT type0 \
1921 fn_name (type0 bid_##arg_name1 \
1922 _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1923 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1924 BID_PROLOG_TYPE_VAL(type0, arg_name1) \
1925 OTHER_BID_PROLOG_VAL()
1926
1927 // BID args and result
1928 #define BID128_FUNCTION_ARGTYPE1_ARG128(fn_name, type1, arg_name1, arg_name2)\
1929 DFP_WRAPFN_DFP_DFP(128, fn_name, bidsize(type1), 128); \
1930 DECLSPEC_OPT BID_UINT128 \
1931 fn_name (type1 bid_##arg_name1, \
1932 BID_UINT128 bid_##arg_name2 _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1933 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1934 BID_PROLOG_TYPE_VAL(type1, arg_name1) \
1935 BID_PROLOG_VAL(arg_name2) \
1936 OTHER_BID_PROLOG_VAL()
1937
1938 // BID args and result
1939 #define BID_TYPE0_FUNCTION_ARG128_ARGTYPE2(type0, fn_name, arg_name1, type2, arg_name2)\
1940 DFP_WRAPFN_DFP_DFP(bidsize(type0), fn_name, 128, bidsize(type2)); \
1941 DECLSPEC_OPT type0 \
1942 fn_name (BID_UINT128 bid_##arg_name1, \
1943 type2 bid_##arg_name2 _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1944 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1945 BID_PROLOG_VAL(arg_name1) \
1946 BID_PROLOG_TYPE_VAL(type2, arg_name2) \
1947 OTHER_BID_PROLOG_VAL()
1948
1949 // BID args and result
1950 #define BID_TYPE0_FUNCTION_ARGTYPE1_ARG128(type0, fn_name, type1, arg_name1, arg_name2)\
1951 DFP_WRAPFN_DFP_DFP(bidsize(type0), fn_name, bidsize(type1), 128); \
1952 DECLSPEC_OPT type0 \
1953 fn_name (type1 bid_##arg_name1, \
1954 BID_UINT128 bid_##arg_name2 _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1955 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1956 BID_PROLOG_TYPE_VAL(type1, arg_name1) \
1957 BID_PROLOG_VAL(arg_name2) \
1958 OTHER_BID_PROLOG_VAL()
1959
1960 // BID args and result
1961 #define BID_TYPE0_FUNCTION_ARG128_ARG128(type0, fn_name, arg_name1, arg_name2)\
1962 DFP_WRAPFN_DFP_DFP(bidsize(type0), fn_name, 128, 128); \
1963 DECLSPEC_OPT type0 \
1964 fn_name (BID_UINT128 bid_##arg_name1, \
1965 BID_UINT128 bid_##arg_name2 _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1966 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1967 BID_PROLOG_VAL(arg_name1) \
1968 BID_PROLOG_VAL(arg_name2) \
1969 OTHER_BID_PROLOG_VAL()
1970
1971 // BID args and result
1972 #define BID_TYPE0_FUNCTION_ARG1(type0, fn_name, arg_name)\
1973 DFP_WRAPFN_DFP(bidsize(type0), fn_name, 128); \
1974 DECLSPEC_OPT type0 \
1975 fn_name (BID_UINT128 bid_##arg_name _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1976 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1977 BID_PROLOG_VAL(arg_name) \
1978 OTHER_BID_PROLOG_VAL()
1979
1980 // BID args and result
1981 #define BID128_FUNCTION_ARGTYPE1(fn_name, type1, arg_name)\
1982 DFP_WRAPFN_DFP(128, fn_name, bidsize(type1)); \
1983 DECLSPEC_OPT BID_UINT128 \
1984 fn_name (type1 bid_##arg_name _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1985 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1986 BID_PROLOG_TYPE_VAL(type1, arg_name) \
1987 OTHER_BID_PROLOG_VAL()
1988
1989 // BID args and result
1990 #define BID_TYPE0_FUNCTION_ARGTYPE1(type0, fn_name, type1, arg_name)\
1991 DFP_WRAPFN_DFP(bidsize(type0), fn_name, bidsize(type1)) \
1992 DECLSPEC_OPT type0 \
1993 fn_name (type1 bid_##arg_name _RND_MODE_PARAM _EXC_FLAGS_PARAM \
1994 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
1995 BID_PROLOG_TYPE_VAL(type1, arg_name) \
1996 OTHER_BID_PROLOG_VAL()
1997
1998 // BID args and result
1999 #define BID_TYPE0_FUNCTION_ARGTYPE1_NORND_DFP(type0, fn_name, type1, arg_name)\
2000 DFP_WRAPFN_DFP(bidsize(type0), fn_name, bidsize(type1)) \
2001 DECLSPEC_OPT type0 \
2002 fn_name (type1 bid_##arg_name _EXC_FLAGS_PARAM \
2003 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
2004 BID_PROLOG_TYPE_VAL(type1, arg_name) \
2005 OTHER_BID_PROLOG_VAL()
2006
2007 // BID args, different type result
2008 #define BID_RESTYPE0_FUNCTION_ARGTYPE1(type0, fn_name, type1, arg_name)\
2009 RES_WRAPFN_DFP(type0, fn_name, bidsize(type1)) \
2010 DECLSPEC_OPT type0 \
2011 fn_name (type1 bid_##arg_name _RND_MODE_PARAM _EXC_FLAGS_PARAM \
2012 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
2013 BID_PROLOG_TYPE_VAL(type1, arg_name) \
2014 OTHER_BID_PROLOG_VAL()
2015
2016 // BID to int/uint functions
2017 #define BID_TYPE0_FUNCTION_ARGTYPE1_NORND(type0, fn_name, type1, arg_name)\
2018 RES_WRAPFN_DFP(type0, fn_name, bidsize(type1)); \
2019 DECLSPEC_OPT type0 \
2020 fn_name (type1 bid_##arg_name _EXC_FLAGS_PARAM \
2021 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
2022 BID_PROLOG_TYPE_VAL(type1, arg_name) \
2023 OTHER_BID_PROLOG_VAL()
2024
2025 // used for BID-to-BID conversions
2026 #define BID_TYPE0_FUNCTION_ARGTYPE1_NORND_NOFLAGS(type0, fn_name, type1, arg_name)\
2027 DFP_WRAPFN_DFP(bidsize(type0), fn_name, bidsize(type1)); \
2028 DECLSPEC_OPT type0 \
2029 fn_name (type1 bid_##arg_name _EXC_FLAGS_PARAM \
2030 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
2031 BID_PROLOG_TYPE_VAL(type1, arg_name)
2032
2033 // fmod, rem
2034 #define BID_TYPE0_FUNCTION_ARGTYPE1_ARGTYPE2_NORND(type0, fn_name, type1, arg_name1, type2, arg_name2)\
2035 DFP_WRAPFN_DFP_DFP(bidsize(type0), fn_name, bidsize(type1), bidsize(type2)); \
2036 DECLSPEC_OPT type0 \
2037 fn_name (type1 bid_##arg_name1, type2 bid_##arg_name2 _EXC_FLAGS_PARAM \
2038 _EXC_MASKS_PARAM _EXC_INFO_PARAM) { \
2039 BID_PROLOG_TYPE_VAL(type1, arg_name1) \
2040 BID_PROLOG_TYPE_VAL(type2, arg_name2) \
2041 OTHER_BID_PROLOG_VAL()
2042 #endif
2043
2044
2045
2046 #define BID_TO_SMALL_BID_UINT_CVT_FUNCTION(type0, fn_name, type1, arg_name, cvt_fn_name, type2, size_mask, invalid_res)\
2047 BID_TYPE0_FUNCTION_ARGTYPE1_NORND(type0, fn_name, type1, arg_name)\
2048 type2 res; \
2049 _IDEC_flags saved_fpsc=*pfpsf; \
2050 BIDECIMAL_CALL1_NORND(cvt_fn_name, res, arg_name); \
2051 if(res & size_mask) { \
2052 *pfpsf = saved_fpsc | BID_INVALID_EXCEPTION; \
2053 res = invalid_res; } \
2054 BID_RETURN_VAL((type0)res); \
2055 }
2056
2057 #define BID_TO_SMALL_INT_CVT_FUNCTION(type0, fn_name, type1, arg_name, cvt_fn_name, type2, size_mask, invalid_res)\
2058 BID_TYPE0_FUNCTION_ARGTYPE1_NORND(type0, fn_name, type1, arg_name)\
2059 type2 res, sgn_mask; \
2060 _IDEC_flags saved_fpsc=*pfpsf; \
2061 BIDECIMAL_CALL1_NORND(cvt_fn_name, res, arg_name); \
2062 sgn_mask = res & size_mask; \
2063 if(sgn_mask && (sgn_mask != (type2)size_mask)) { \
2064 *pfpsf = saved_fpsc | BID_INVALID_EXCEPTION; \
2065 res = invalid_res; } \
2066 BID_RETURN_VAL((type0)res); \
2067 }
2068 #endif
2069