annotate libgcc/dfp-bit.h @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Header file for dfp-bit.c.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 Copyright (C) 2005-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
7 the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
8 Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
9 version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
14 for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 Under Section 7 of GPL version 3, you are granted additional
kono
parents:
diff changeset
17 permissions described in the GCC Runtime Library Exception, version
kono
parents:
diff changeset
18 3.1, as published by the Free Software Foundation.
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 You should have received a copy of the GNU General Public License and
kono
parents:
diff changeset
21 a copy of the GCC Runtime Library Exception along with this program;
kono
parents:
diff changeset
22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
kono
parents:
diff changeset
23 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 #ifndef _DFPBIT_H
kono
parents:
diff changeset
26 #define _DFPBIT_H
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 #include <float.h>
kono
parents:
diff changeset
29 #include <fenv.h>
kono
parents:
diff changeset
30 #include <decRound.h>
kono
parents:
diff changeset
31 #include <decExcept.h>
kono
parents:
diff changeset
32 #include "tconfig.h"
kono
parents:
diff changeset
33 #include "coretypes.h"
kono
parents:
diff changeset
34 #include "tm.h"
kono
parents:
diff changeset
35 #include "libgcc_tm.h"
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 /* We need to know the size of long double that the C library supports.
kono
parents:
diff changeset
38 Don't use LIBGCC2_HAS_XF_MODE or LIBGCC2_HAS_TF_MODE here because
kono
parents:
diff changeset
39 some targets set both of those. */
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 #ifndef __LIBGCC_XF_MANT_DIG__
kono
parents:
diff changeset
42 #define __LIBGCC_XF_MANT_DIG__ 0
kono
parents:
diff changeset
43 #endif
kono
parents:
diff changeset
44 #define LONG_DOUBLE_HAS_XF_MODE \
kono
parents:
diff changeset
45 (__LDBL_MANT_DIG__ == __LIBGCC_XF_MANT_DIG__)
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 #ifndef __LIBGCC_TF_MANT_DIG__
kono
parents:
diff changeset
48 #define __LIBGCC_TF_MANT_DIG__ 0
kono
parents:
diff changeset
49 #endif
kono
parents:
diff changeset
50 #define LONG_DOUBLE_HAS_TF_MODE \
kono
parents:
diff changeset
51 (__LDBL_MANT_DIG__ == __LIBGCC_TF_MANT_DIG__)
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 /* Depending on WIDTH, define a number of macros:
kono
parents:
diff changeset
54
kono
parents:
diff changeset
55 DFP_C_TYPE: type of the arguments to the libgcc functions;
kono
parents:
diff changeset
56 (eg _Decimal32)
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 IEEE_TYPE: the corresponding (encoded) IEEE754 type;
kono
parents:
diff changeset
59 (eg decimal32)
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 TO_INTERNAL: the name of the decNumber function to convert an
kono
parents:
diff changeset
62 encoded value into the decNumber internal representation;
kono
parents:
diff changeset
63
kono
parents:
diff changeset
64 TO_ENCODED: the name of the decNumber function to convert an
kono
parents:
diff changeset
65 internally represented decNumber into the encoded
kono
parents:
diff changeset
66 representation.
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 FROM_STRING: the name of the decNumber function to read an
kono
parents:
diff changeset
69 encoded value from a string.
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 TO_STRING: the name of the decNumber function to write an
kono
parents:
diff changeset
72 encoded value to a string. */
kono
parents:
diff changeset
73
kono
parents:
diff changeset
74 #if WIDTH == 32
kono
parents:
diff changeset
75 #define DFP_C_TYPE _Decimal32
kono
parents:
diff changeset
76 #define IEEE_TYPE decimal32
kono
parents:
diff changeset
77 #define HOST_TO_IEEE __host_to_ieee_32
kono
parents:
diff changeset
78 #define IEEE_TO_HOST __ieee_to_host_32
kono
parents:
diff changeset
79 #define TO_INTERNAL __decimal32ToNumber
kono
parents:
diff changeset
80 #define TO_ENCODED __decimal32FromNumber
kono
parents:
diff changeset
81 #define FROM_STRING __decimal32FromString
kono
parents:
diff changeset
82 #define TO_STRING __decimal32ToString
kono
parents:
diff changeset
83 #elif WIDTH == 64
kono
parents:
diff changeset
84 #define DFP_C_TYPE _Decimal64
kono
parents:
diff changeset
85 #define IEEE_TYPE decimal64
kono
parents:
diff changeset
86 #define HOST_TO_IEEE __host_to_ieee_64
kono
parents:
diff changeset
87 #define IEEE_TO_HOST __ieee_to_host_64
kono
parents:
diff changeset
88 #define TO_INTERNAL __decimal64ToNumber
kono
parents:
diff changeset
89 #define TO_ENCODED __decimal64FromNumber
kono
parents:
diff changeset
90 #define FROM_STRING __decimal64FromString
kono
parents:
diff changeset
91 #define TO_STRING __decimal64ToString
kono
parents:
diff changeset
92 #elif WIDTH == 128
kono
parents:
diff changeset
93 #define DFP_C_TYPE _Decimal128
kono
parents:
diff changeset
94 #define IEEE_TYPE decimal128
kono
parents:
diff changeset
95 #define HOST_TO_IEEE __host_to_ieee_128
kono
parents:
diff changeset
96 #define IEEE_TO_HOST __ieee_to_host_128
kono
parents:
diff changeset
97 #define TO_INTERNAL __decimal128ToNumber
kono
parents:
diff changeset
98 #define TO_ENCODED __decimal128FromNumber
kono
parents:
diff changeset
99 #define FROM_STRING __decimal128FromString
kono
parents:
diff changeset
100 #define TO_STRING __decimal128ToString
kono
parents:
diff changeset
101 #else
kono
parents:
diff changeset
102 #error invalid decimal float word width
kono
parents:
diff changeset
103 #endif
kono
parents:
diff changeset
104
kono
parents:
diff changeset
105 /* We define __DEC_EVAL_METHOD__ to 2, saying that we evaluate all
kono
parents:
diff changeset
106 operations and constants to the range and precision of the _Decimal128
kono
parents:
diff changeset
107 type. Make it so. */
kono
parents:
diff changeset
108 #if WIDTH == 32
kono
parents:
diff changeset
109 #define CONTEXT_INIT DEC_INIT_DECIMAL32
kono
parents:
diff changeset
110 #elif WIDTH == 64
kono
parents:
diff changeset
111 #define CONTEXT_INIT DEC_INIT_DECIMAL64
kono
parents:
diff changeset
112 #elif WIDTH == 128
kono
parents:
diff changeset
113 #define CONTEXT_INIT DEC_INIT_DECIMAL128
kono
parents:
diff changeset
114 #endif
kono
parents:
diff changeset
115
kono
parents:
diff changeset
116 #ifndef DFP_INIT_ROUNDMODE
kono
parents:
diff changeset
117 #define DFP_INIT_ROUNDMODE(A) A = DEC_ROUND_HALF_EVEN
kono
parents:
diff changeset
118 #endif
kono
parents:
diff changeset
119
kono
parents:
diff changeset
120 #ifdef DFP_EXCEPTIONS_ENABLED
kono
parents:
diff changeset
121 /* Return IEEE exception flags based on decNumber status flags. */
kono
parents:
diff changeset
122 #define DFP_IEEE_FLAGS(DEC_FLAGS) __extension__ \
kono
parents:
diff changeset
123 ({int _fe_flags = 0; \
kono
parents:
diff changeset
124 if ((dec_flags & DEC_IEEE_854_Division_by_zero) != 0) \
kono
parents:
diff changeset
125 _fe_flags |= FE_DIVBYZERO; \
kono
parents:
diff changeset
126 if ((dec_flags & DEC_IEEE_854_Inexact) != 0) \
kono
parents:
diff changeset
127 _fe_flags |= FE_INEXACT; \
kono
parents:
diff changeset
128 if ((dec_flags & DEC_IEEE_854_Invalid_operation) != 0) \
kono
parents:
diff changeset
129 _fe_flags |= FE_INVALID; \
kono
parents:
diff changeset
130 if ((dec_flags & DEC_IEEE_854_Overflow) != 0) \
kono
parents:
diff changeset
131 _fe_flags |= FE_OVERFLOW; \
kono
parents:
diff changeset
132 if ((dec_flags & DEC_IEEE_854_Underflow) != 0) \
kono
parents:
diff changeset
133 _fe_flags |= FE_UNDERFLOW; \
kono
parents:
diff changeset
134 _fe_flags; })
kono
parents:
diff changeset
135 #else
kono
parents:
diff changeset
136 #define DFP_EXCEPTIONS_ENABLED 0
kono
parents:
diff changeset
137 #define DFP_IEEE_FLAGS(A) 0
kono
parents:
diff changeset
138 #define DFP_HANDLE_EXCEPTIONS(A) do {} while (0)
kono
parents:
diff changeset
139 #endif
kono
parents:
diff changeset
140
kono
parents:
diff changeset
141 /* Conversions between different decimal float types use WIDTH_TO to
kono
parents:
diff changeset
142 determine additional macros to define. */
kono
parents:
diff changeset
143
kono
parents:
diff changeset
144 #if defined (L_dd_to_sd) || defined (L_td_to_sd)
kono
parents:
diff changeset
145 #define WIDTH_TO 32
kono
parents:
diff changeset
146 #elif defined (L_sd_to_dd) || defined (L_td_to_dd)
kono
parents:
diff changeset
147 #define WIDTH_TO 64
kono
parents:
diff changeset
148 #elif defined (L_sd_to_td) || defined (L_dd_to_td)
kono
parents:
diff changeset
149 #define WIDTH_TO 128
kono
parents:
diff changeset
150 #endif
kono
parents:
diff changeset
151
kono
parents:
diff changeset
152 /* If WIDTH_TO is defined, define additional macros:
kono
parents:
diff changeset
153
kono
parents:
diff changeset
154 DFP_C_TYPE_TO: type of the result of dfp to dfp conversion.
kono
parents:
diff changeset
155
kono
parents:
diff changeset
156 IEEE_TYPE_TO: the corresponding (encoded) IEEE754 type.
kono
parents:
diff changeset
157
kono
parents:
diff changeset
158 TO_ENCODED_TO: the name of the decNumber function to convert an
kono
parents:
diff changeset
159 internally represented decNumber into the encoded representation
kono
parents:
diff changeset
160 for the destination. */
kono
parents:
diff changeset
161
kono
parents:
diff changeset
162 #if WIDTH_TO == 32
kono
parents:
diff changeset
163 #define DFP_C_TYPE_TO _Decimal32
kono
parents:
diff changeset
164 #define IEEE_TYPE_TO decimal32
kono
parents:
diff changeset
165 #define TO_ENCODED_TO __decimal32FromNumber
kono
parents:
diff changeset
166 #define IEEE_TO_HOST_TO __ieee_to_host_32
kono
parents:
diff changeset
167 #elif WIDTH_TO == 64
kono
parents:
diff changeset
168 #define DFP_C_TYPE_TO _Decimal64
kono
parents:
diff changeset
169 #define IEEE_TYPE_TO decimal64
kono
parents:
diff changeset
170 #define TO_ENCODED_TO __decimal64FromNumber
kono
parents:
diff changeset
171 #define IEEE_TO_HOST_TO __ieee_to_host_64
kono
parents:
diff changeset
172 #elif WIDTH_TO == 128
kono
parents:
diff changeset
173 #define DFP_C_TYPE_TO _Decimal128
kono
parents:
diff changeset
174 #define IEEE_TYPE_TO decimal128
kono
parents:
diff changeset
175 #define TO_ENCODED_TO __decimal128FromNumber
kono
parents:
diff changeset
176 #define IEEE_TO_HOST_TO __ieee_to_host_128
kono
parents:
diff changeset
177 #endif
kono
parents:
diff changeset
178
kono
parents:
diff changeset
179 /* Conversions between decimal float types and integral types use INT_KIND
kono
parents:
diff changeset
180 to determine the data type and C functions to use. */
kono
parents:
diff changeset
181
kono
parents:
diff changeset
182 #if defined (L_sd_to_si) || defined (L_dd_to_si) || defined (L_td_to_si) \
kono
parents:
diff changeset
183 || defined (L_si_to_sd) || defined (L_si_to_dd) || defined (L_si_to_td)
kono
parents:
diff changeset
184 #define INT_KIND 1
kono
parents:
diff changeset
185 #elif defined (L_sd_to_di) || defined (L_dd_to_di) || defined (L_td_to_di) \
kono
parents:
diff changeset
186 || defined (L_di_to_sd) || defined (L_di_to_dd) || defined (L_di_to_td)
kono
parents:
diff changeset
187 #define INT_KIND 2
kono
parents:
diff changeset
188 #elif defined (L_sd_to_usi) || defined (L_dd_to_usi) || defined (L_td_to_usi) \
kono
parents:
diff changeset
189 || defined (L_usi_to_sd) || defined (L_usi_to_dd) || defined (L_usi_to_td)
kono
parents:
diff changeset
190 #define INT_KIND 3
kono
parents:
diff changeset
191 #elif defined (L_sd_to_udi) || defined (L_dd_to_udi) || defined (L_td_to_udi) \
kono
parents:
diff changeset
192 || defined (L_udi_to_sd) || defined (L_udi_to_dd) || defined (L_udi_to_td)
kono
parents:
diff changeset
193 #define INT_KIND 4
kono
parents:
diff changeset
194 #endif
kono
parents:
diff changeset
195
kono
parents:
diff changeset
196 /* If INT_KIND is defined, define additional macros:
kono
parents:
diff changeset
197
kono
parents:
diff changeset
198 INT_TYPE: The integer data type.
kono
parents:
diff changeset
199
kono
parents:
diff changeset
200 INT_FMT: The format string for writing the integer to a string.
kono
parents:
diff changeset
201
kono
parents:
diff changeset
202 CAST_FOR_FMT: Cast variable of INT_KIND to C type for sprintf.
kono
parents:
diff changeset
203 This works for ILP32 and LP64, won't for other type size systems.
kono
parents:
diff changeset
204
kono
parents:
diff changeset
205 STR_TO_INT: The function to read the integer from a string. */
kono
parents:
diff changeset
206
kono
parents:
diff changeset
207 #if INT_KIND == 1
kono
parents:
diff changeset
208 #define INT_TYPE SItype
kono
parents:
diff changeset
209 #define INT_FMT "%d"
kono
parents:
diff changeset
210 #define CAST_FOR_FMT(A) (int)A
kono
parents:
diff changeset
211 #define STR_TO_INT strtol
kono
parents:
diff changeset
212 #elif INT_KIND == 2
kono
parents:
diff changeset
213 #define INT_TYPE DItype
kono
parents:
diff changeset
214 #define INT_FMT "%lld"
kono
parents:
diff changeset
215 #define CAST_FOR_FMT(A) (long long)A
kono
parents:
diff changeset
216 #define STR_TO_INT strtoll
kono
parents:
diff changeset
217 #elif INT_KIND == 3
kono
parents:
diff changeset
218 #define INT_TYPE USItype
kono
parents:
diff changeset
219 #define INT_FMT "%u"
kono
parents:
diff changeset
220 #define CAST_FOR_FMT(A) (unsigned int)A
kono
parents:
diff changeset
221 #define STR_TO_INT strtoul
kono
parents:
diff changeset
222 #elif INT_KIND == 4
kono
parents:
diff changeset
223 #define INT_TYPE UDItype
kono
parents:
diff changeset
224 #define INT_FMT "%llu"
kono
parents:
diff changeset
225 #define CAST_FOR_FMT(A) (unsigned long long)A
kono
parents:
diff changeset
226 #define STR_TO_INT strtoull
kono
parents:
diff changeset
227 #endif
kono
parents:
diff changeset
228
kono
parents:
diff changeset
229 /* Conversions between decimal float types and binary float types use
kono
parents:
diff changeset
230 BFP_KIND to determine the data type and C functions to use. */
kono
parents:
diff changeset
231
kono
parents:
diff changeset
232 #if defined (L_sd_to_sf) || defined (L_dd_to_sf) || defined (L_td_to_sf) \
kono
parents:
diff changeset
233 || defined (L_sf_to_sd) || defined (L_sf_to_dd) || defined (L_sf_to_td)
kono
parents:
diff changeset
234 #define BFP_KIND 1
kono
parents:
diff changeset
235 #elif defined (L_sd_to_df) || defined (L_dd_to_df ) || defined (L_td_to_df) \
kono
parents:
diff changeset
236 || defined (L_df_to_sd) || defined (L_df_to_dd) || defined (L_df_to_td)
kono
parents:
diff changeset
237 #define BFP_KIND 2
kono
parents:
diff changeset
238 #elif defined (L_sd_to_xf) || defined (L_dd_to_xf ) || defined (L_td_to_xf) \
kono
parents:
diff changeset
239 || defined (L_xf_to_sd) || defined (L_xf_to_dd) || defined (L_xf_to_td)
kono
parents:
diff changeset
240 #define BFP_KIND 3
kono
parents:
diff changeset
241 #elif defined (L_sd_to_tf) || defined (L_dd_to_tf) || defined (L_td_to_tf) \
kono
parents:
diff changeset
242 || defined (L_tf_to_sd) || defined (L_tf_to_dd) || defined (L_tf_to_td)
kono
parents:
diff changeset
243 #define BFP_KIND 4
kono
parents:
diff changeset
244 #endif
kono
parents:
diff changeset
245
kono
parents:
diff changeset
246 /* If BFP_KIND is defined, define additional macros:
kono
parents:
diff changeset
247
kono
parents:
diff changeset
248 BFP_TYPE: The binary floating point data type.
kono
parents:
diff changeset
249
kono
parents:
diff changeset
250 BFP_FMT: The format string for writing the value to a string.
kono
parents:
diff changeset
251 The number of decimal digits printed is
kono
parents:
diff changeset
252 ceil (nbits / log2 (10.) + 1)
kono
parents:
diff changeset
253 as described in David Matula's CACM 19(3) 716-723 June 1968 paper.
kono
parents:
diff changeset
254
kono
parents:
diff changeset
255 BFP_VIA_TYPE: Type to which to cast a variable of BPF_TYPE for a
kono
parents:
diff changeset
256 call to sprintf.
kono
parents:
diff changeset
257
kono
parents:
diff changeset
258 STR_TO_BFP: The function to read the value from a string. */
kono
parents:
diff changeset
259
kono
parents:
diff changeset
260 #if BFP_KIND == 1
kono
parents:
diff changeset
261 #define BFP_TYPE SFtype
kono
parents:
diff changeset
262 #define BFP_FMT "%.9e"
kono
parents:
diff changeset
263 #define BFP_VIA_TYPE double
kono
parents:
diff changeset
264 #define STR_TO_BFP strtof
kono
parents:
diff changeset
265
kono
parents:
diff changeset
266 #elif BFP_KIND == 2
kono
parents:
diff changeset
267 #define BFP_TYPE DFtype
kono
parents:
diff changeset
268 #define BFP_FMT "%.17e"
kono
parents:
diff changeset
269 #define BFP_VIA_TYPE double
kono
parents:
diff changeset
270 #define STR_TO_BFP strtod
kono
parents:
diff changeset
271
kono
parents:
diff changeset
272 #elif BFP_KIND == 3
kono
parents:
diff changeset
273 #if LONG_DOUBLE_HAS_XF_MODE
kono
parents:
diff changeset
274 #define BFP_TYPE XFtype
kono
parents:
diff changeset
275 #define BFP_FMT "%.21Le"
kono
parents:
diff changeset
276 #define BFP_VIA_TYPE long double
kono
parents:
diff changeset
277 #define STR_TO_BFP strtold
kono
parents:
diff changeset
278 #endif /* LONG_DOUBLE_HAS_XF_MODE */
kono
parents:
diff changeset
279
kono
parents:
diff changeset
280 #elif BFP_KIND == 4
kono
parents:
diff changeset
281 #if LONG_DOUBLE_HAS_TF_MODE
kono
parents:
diff changeset
282 #define BFP_TYPE TFtype
kono
parents:
diff changeset
283 #if LDBL_MANT_DIG == 106
kono
parents:
diff changeset
284 #define BFP_FMT "%.33Le"
kono
parents:
diff changeset
285 #elif LDBL_MANT_DIG == 113
kono
parents:
diff changeset
286 #define BFP_FMT "%.36Le"
kono
parents:
diff changeset
287 #else
kono
parents:
diff changeset
288 #error "unknown long double size, cannot define BFP_FMT"
kono
parents:
diff changeset
289 #endif /* LDBL_MANT_DIG */
kono
parents:
diff changeset
290 #define STR_TO_BFP strtold
kono
parents:
diff changeset
291 #define BFP_VIA_TYPE long double
kono
parents:
diff changeset
292 #endif /* LONG_DOUBLE_HAS_TF_MODE */
kono
parents:
diff changeset
293
kono
parents:
diff changeset
294 #endif /* BFP_KIND */
kono
parents:
diff changeset
295
kono
parents:
diff changeset
296 #if WIDTH == 128 || WIDTH_TO == 128
kono
parents:
diff changeset
297 #include "decimal128.h"
kono
parents:
diff changeset
298 #include "decQuad.h"
kono
parents:
diff changeset
299 #endif
kono
parents:
diff changeset
300 #if WIDTH == 64 || WIDTH_TO == 64
kono
parents:
diff changeset
301 #include "decimal64.h"
kono
parents:
diff changeset
302 #include "decDouble.h"
kono
parents:
diff changeset
303 #endif
kono
parents:
diff changeset
304 #if WIDTH == 32 || WIDTH_TO == 32
kono
parents:
diff changeset
305 #include "decimal32.h"
kono
parents:
diff changeset
306 #include "decSingle.h"
kono
parents:
diff changeset
307 #endif
kono
parents:
diff changeset
308 #include "decNumber.h"
kono
parents:
diff changeset
309
kono
parents:
diff changeset
310 /* Names of arithmetic functions. */
kono
parents:
diff changeset
311
kono
parents:
diff changeset
312 #if ENABLE_DECIMAL_BID_FORMAT
kono
parents:
diff changeset
313 #define DPD_BID_NAME(DPD,BID) BID
kono
parents:
diff changeset
314 #else
kono
parents:
diff changeset
315 #define DPD_BID_NAME(DPD,BID) DPD
kono
parents:
diff changeset
316 #endif
kono
parents:
diff changeset
317
kono
parents:
diff changeset
318 #if WIDTH == 32
kono
parents:
diff changeset
319 #define DFP_ADD DPD_BID_NAME(__dpd_addsd3,__bid_addsd3)
kono
parents:
diff changeset
320 #define DFP_SUB DPD_BID_NAME(__dpd_subsd3,__bid_subsd3)
kono
parents:
diff changeset
321 #define DFP_MULTIPLY DPD_BID_NAME(__dpd_mulsd3,__bid_mulsd3)
kono
parents:
diff changeset
322 #define DFP_DIVIDE DPD_BID_NAME(__dpd_divsd3,__bid_divsd3)
kono
parents:
diff changeset
323 #define DFP_EQ DPD_BID_NAME(__dpd_eqsd2,__bid_eqsd2)
kono
parents:
diff changeset
324 #define DFP_NE DPD_BID_NAME(__dpd_nesd2,__bid_nesd2)
kono
parents:
diff changeset
325 #define DFP_LT DPD_BID_NAME(__dpd_ltsd2,__bid_ltsd2)
kono
parents:
diff changeset
326 #define DFP_GT DPD_BID_NAME(__dpd_gtsd2,__bid_gtsd2)
kono
parents:
diff changeset
327 #define DFP_LE DPD_BID_NAME(__dpd_lesd2,__bid_lesd2)
kono
parents:
diff changeset
328 #define DFP_GE DPD_BID_NAME(__dpd_gesd2,__bid_gesd2)
kono
parents:
diff changeset
329 #define DFP_UNORD DPD_BID_NAME(__dpd_unordsd2,__bid_unordsd2)
kono
parents:
diff changeset
330 #elif WIDTH == 64
kono
parents:
diff changeset
331 #define DFP_ADD DPD_BID_NAME(__dpd_adddd3,__bid_adddd3)
kono
parents:
diff changeset
332 #define DFP_SUB DPD_BID_NAME(__dpd_subdd3,__bid_subdd3)
kono
parents:
diff changeset
333 #define DFP_MULTIPLY DPD_BID_NAME(__dpd_muldd3,__bid_muldd3)
kono
parents:
diff changeset
334 #define DFP_DIVIDE DPD_BID_NAME(__dpd_divdd3,__bid_divdd3)
kono
parents:
diff changeset
335 #define DFP_EQ DPD_BID_NAME(__dpd_eqdd2,__bid_eqdd2)
kono
parents:
diff changeset
336 #define DFP_NE DPD_BID_NAME(__dpd_nedd2,__bid_nedd2)
kono
parents:
diff changeset
337 #define DFP_LT DPD_BID_NAME(__dpd_ltdd2,__bid_ltdd2)
kono
parents:
diff changeset
338 #define DFP_GT DPD_BID_NAME(__dpd_gtdd2,__bid_gtdd2)
kono
parents:
diff changeset
339 #define DFP_LE DPD_BID_NAME(__dpd_ledd2,__bid_ledd2)
kono
parents:
diff changeset
340 #define DFP_GE DPD_BID_NAME(__dpd_gedd2,__bid_gedd2)
kono
parents:
diff changeset
341 #define DFP_UNORD DPD_BID_NAME(__dpd_unorddd2,__bid_unorddd2)
kono
parents:
diff changeset
342 #elif WIDTH == 128
kono
parents:
diff changeset
343 #define DFP_ADD DPD_BID_NAME(__dpd_addtd3,__bid_addtd3)
kono
parents:
diff changeset
344 #define DFP_SUB DPD_BID_NAME(__dpd_subtd3,__bid_subtd3)
kono
parents:
diff changeset
345 #define DFP_MULTIPLY DPD_BID_NAME(__dpd_multd3,__bid_multd3)
kono
parents:
diff changeset
346 #define DFP_DIVIDE DPD_BID_NAME(__dpd_divtd3,__bid_divtd3)
kono
parents:
diff changeset
347 #define DFP_EQ DPD_BID_NAME(__dpd_eqtd2,__bid_eqtd2)
kono
parents:
diff changeset
348 #define DFP_NE DPD_BID_NAME(__dpd_netd2,__bid_netd2)
kono
parents:
diff changeset
349 #define DFP_LT DPD_BID_NAME(__dpd_lttd2,__bid_lttd2)
kono
parents:
diff changeset
350 #define DFP_GT DPD_BID_NAME(__dpd_gttd2,__bid_gttd2)
kono
parents:
diff changeset
351 #define DFP_LE DPD_BID_NAME(__dpd_letd2,__bid_letd2)
kono
parents:
diff changeset
352 #define DFP_GE DPD_BID_NAME(__dpd_getd2,__bid_getd2)
kono
parents:
diff changeset
353 #define DFP_UNORD DPD_BID_NAME(__dpd_unordtd2,__bid_unordtd2)
kono
parents:
diff changeset
354 #endif
kono
parents:
diff changeset
355
kono
parents:
diff changeset
356 /* Names of decNumber functions for DPD arithmetic. */
kono
parents:
diff changeset
357
kono
parents:
diff changeset
358 #if WIDTH == 32
kono
parents:
diff changeset
359 #define decFloat decDouble
kono
parents:
diff changeset
360 #define DFP_BINARY_OP d32_binary_op
kono
parents:
diff changeset
361 #define DFP_COMPARE_OP d32_compare_op
kono
parents:
diff changeset
362 #define DEC_FLOAT_ADD decDoubleAdd
kono
parents:
diff changeset
363 #define DEC_FLOAT_SUBTRACT decDoubleSubtract
kono
parents:
diff changeset
364 #define DEC_FLOAT_MULTIPLY decDoubleMultiply
kono
parents:
diff changeset
365 #define DEC_FLOAT_DIVIDE decDoubleDivide
kono
parents:
diff changeset
366 #define DEC_FLOAT_COMPARE decDoubleCompare
kono
parents:
diff changeset
367 #define DEC_FLOAT_IS_ZERO decDoubleIsZero
kono
parents:
diff changeset
368 #define DEC_FLOAT_IS_NAN decDoubleIsNaN
kono
parents:
diff changeset
369 #define DEC_FLOAT_IS_SIGNED decDoubleIsSigned
kono
parents:
diff changeset
370 #elif WIDTH == 64
kono
parents:
diff changeset
371 #define DFP_BINARY_OP dnn_binary_op
kono
parents:
diff changeset
372 #define DFP_COMPARE_OP dnn_compare_op
kono
parents:
diff changeset
373 #define decFloat decDouble
kono
parents:
diff changeset
374 #define DEC_FLOAT_ADD decDoubleAdd
kono
parents:
diff changeset
375 #define DEC_FLOAT_SUBTRACT decDoubleSubtract
kono
parents:
diff changeset
376 #define DEC_FLOAT_MULTIPLY decDoubleMultiply
kono
parents:
diff changeset
377 #define DEC_FLOAT_DIVIDE decDoubleDivide
kono
parents:
diff changeset
378 #define DEC_FLOAT_COMPARE decDoubleCompare
kono
parents:
diff changeset
379 #define DEC_FLOAT_IS_ZERO decDoubleIsZero
kono
parents:
diff changeset
380 #define DEC_FLOAT_IS_NAN decDoubleIsNaN
kono
parents:
diff changeset
381 #define DEC_FLOAT_IS_SIGNED decDoubleIsSigned
kono
parents:
diff changeset
382 #elif WIDTH == 128
kono
parents:
diff changeset
383 #define DFP_BINARY_OP dnn_binary_op
kono
parents:
diff changeset
384 #define DFP_COMPARE_OP dnn_compare_op
kono
parents:
diff changeset
385 #define decFloat decQuad
kono
parents:
diff changeset
386 #define DEC_FLOAT_ADD decQuadAdd
kono
parents:
diff changeset
387 #define DEC_FLOAT_SUBTRACT decQuadSubtract
kono
parents:
diff changeset
388 #define DEC_FLOAT_MULTIPLY decQuadMultiply
kono
parents:
diff changeset
389 #define DEC_FLOAT_DIVIDE decQuadDivide
kono
parents:
diff changeset
390 #define DEC_FLOAT_COMPARE decQuadCompare
kono
parents:
diff changeset
391 #define DEC_FLOAT_IS_ZERO decQuadIsZero
kono
parents:
diff changeset
392 #define DEC_FLOAT_IS_NAN decQuadIsNaN
kono
parents:
diff changeset
393 #define DEC_FLOAT_IS_SIGNED decQuadIsSigned
kono
parents:
diff changeset
394 #endif
kono
parents:
diff changeset
395
kono
parents:
diff changeset
396 /* Names of functions to convert between different decimal float types. */
kono
parents:
diff changeset
397
kono
parents:
diff changeset
398 #if WIDTH == 32
kono
parents:
diff changeset
399 #if WIDTH_TO == 64
kono
parents:
diff changeset
400 #define DFP_TO_DFP DPD_BID_NAME(__dpd_extendsddd2,__bid_extendsddd2)
kono
parents:
diff changeset
401 #elif WIDTH_TO == 128
kono
parents:
diff changeset
402 #define DFP_TO_DFP DPD_BID_NAME(__dpd_extendsdtd2,__bid_extendsdtd2)
kono
parents:
diff changeset
403 #endif
kono
parents:
diff changeset
404 #elif WIDTH == 64
kono
parents:
diff changeset
405 #if WIDTH_TO == 32
kono
parents:
diff changeset
406 #define DFP_TO_DFP DPD_BID_NAME(__dpd_truncddsd2,__bid_truncddsd2)
kono
parents:
diff changeset
407 #elif WIDTH_TO == 128
kono
parents:
diff changeset
408 #define DFP_TO_DFP DPD_BID_NAME(__dpd_extendddtd2,__bid_extendddtd2)
kono
parents:
diff changeset
409 #endif
kono
parents:
diff changeset
410 #elif WIDTH == 128
kono
parents:
diff changeset
411 #if WIDTH_TO == 32
kono
parents:
diff changeset
412 #define DFP_TO_DFP DPD_BID_NAME(__dpd_trunctdsd2,__bid_trunctdsd2)
kono
parents:
diff changeset
413 #elif WIDTH_TO == 64
kono
parents:
diff changeset
414 #define DFP_TO_DFP DPD_BID_NAME(__dpd_trunctddd2,__bid_trunctddd2)
kono
parents:
diff changeset
415 #endif
kono
parents:
diff changeset
416 #endif
kono
parents:
diff changeset
417
kono
parents:
diff changeset
418 /* Names of functions to convert between decimal float and integers. */
kono
parents:
diff changeset
419
kono
parents:
diff changeset
420 #if WIDTH == 32
kono
parents:
diff changeset
421 #if INT_KIND == 1
kono
parents:
diff changeset
422 #define INT_TO_DFP DPD_BID_NAME(__dpd_floatsisd,__bid_floatsisd)
kono
parents:
diff changeset
423 #define DFP_TO_INT DPD_BID_NAME(__dpd_fixsdsi,__bid_fixsdsi)
kono
parents:
diff changeset
424 #define DEC_FLOAT_FROM_INT decDoubleFromInt32
kono
parents:
diff changeset
425 #define DEC_FLOAT_TO_INT decDoubleToInt32
kono
parents:
diff changeset
426 #elif INT_KIND == 2
kono
parents:
diff changeset
427 #define INT_TO_DFP DPD_BID_NAME(__dpd_floatdisd,__bid_floatdisd)
kono
parents:
diff changeset
428 #define DFP_TO_INT DPD_BID_NAME(__dpd_fixsddi,__bid_fixsddi)
kono
parents:
diff changeset
429 #elif INT_KIND == 3
kono
parents:
diff changeset
430 #define INT_TO_DFP DPD_BID_NAME(__dpd_floatunssisd,__bid_floatunssisd)
kono
parents:
diff changeset
431 #define DFP_TO_INT DPD_BID_NAME(__dpd_fixunssdsi,__bid_fixunssdsi)
kono
parents:
diff changeset
432 #define DEC_FLOAT_FROM_INT decDoubleFromUInt32
kono
parents:
diff changeset
433 #define DEC_FLOAT_TO_INT decDoubleToUInt32
kono
parents:
diff changeset
434 #elif INT_KIND == 4
kono
parents:
diff changeset
435 #define INT_TO_DFP DPD_BID_NAME(__dpd_floatunsdisd,__bid_floatunsdisd)
kono
parents:
diff changeset
436 #define DFP_TO_INT DPD_BID_NAME(__dpd_fixunssddi,__bid_fixunssddi)
kono
parents:
diff changeset
437 #endif
kono
parents:
diff changeset
438 #elif WIDTH == 64
kono
parents:
diff changeset
439 #define decFloat decDouble
kono
parents:
diff changeset
440 #if INT_KIND == 1
kono
parents:
diff changeset
441 #define INT_TO_DFP DPD_BID_NAME(__dpd_floatsidd,__bid_floatsidd)
kono
parents:
diff changeset
442 #define DFP_TO_INT DPD_BID_NAME(__dpd_fixddsi,__bid_fixddsi)
kono
parents:
diff changeset
443 #define DEC_FLOAT_FROM_INT decDoubleFromInt32
kono
parents:
diff changeset
444 #define DEC_FLOAT_TO_INT decDoubleToInt32
kono
parents:
diff changeset
445 #elif INT_KIND == 2
kono
parents:
diff changeset
446 #define INT_TO_DFP DPD_BID_NAME(__dpd_floatdidd,__bid_floatdidd)
kono
parents:
diff changeset
447 #define DFP_TO_INT DPD_BID_NAME(__dpd_fixdddi,__bid_fixdddi)
kono
parents:
diff changeset
448 #elif INT_KIND == 3
kono
parents:
diff changeset
449 #define INT_TO_DFP DPD_BID_NAME(__dpd_floatunssidd,__bid_floatunssidd)
kono
parents:
diff changeset
450 #define DFP_TO_INT DPD_BID_NAME(__dpd_fixunsddsi,__bid_fixunsddsi)
kono
parents:
diff changeset
451 #define DEC_FLOAT_FROM_INT decDoubleFromUInt32
kono
parents:
diff changeset
452 #define DEC_FLOAT_TO_INT decDoubleToUInt32
kono
parents:
diff changeset
453 #elif INT_KIND == 4
kono
parents:
diff changeset
454 #define INT_TO_DFP DPD_BID_NAME(__dpd_floatunsdidd,__bid_floatunsdidd)
kono
parents:
diff changeset
455 #define DFP_TO_INT DPD_BID_NAME(__dpd_fixunsdddi,__bid_fixunsdddi)
kono
parents:
diff changeset
456 #endif
kono
parents:
diff changeset
457 #elif WIDTH == 128
kono
parents:
diff changeset
458 #define decFloat decQuad
kono
parents:
diff changeset
459 #if INT_KIND == 1
kono
parents:
diff changeset
460 #define INT_TO_DFP DPD_BID_NAME(__dpd_floatsitd,__bid_floatsitd)
kono
parents:
diff changeset
461 #define DFP_TO_INT DPD_BID_NAME(__dpd_fixtdsi,__bid_fixtdsi)
kono
parents:
diff changeset
462 #define DEC_FLOAT_FROM_INT decQuadFromInt32
kono
parents:
diff changeset
463 #define DEC_FLOAT_TO_INT decQuadToInt32
kono
parents:
diff changeset
464 #elif INT_KIND == 2
kono
parents:
diff changeset
465 #define INT_TO_DFP DPD_BID_NAME(__dpd_floatditd,__bid_floatditd)
kono
parents:
diff changeset
466 #define DFP_TO_INT DPD_BID_NAME(__dpd_fixtddi,__bid_fixtddi)
kono
parents:
diff changeset
467 #elif INT_KIND == 3
kono
parents:
diff changeset
468 #define INT_TO_DFP DPD_BID_NAME(__dpd_floatunssitd,__bid_floatunssitd)
kono
parents:
diff changeset
469 #define DFP_TO_INT DPD_BID_NAME(__dpd_fixunstdsi,__bid_fixunstdsi)
kono
parents:
diff changeset
470 #define DEC_FLOAT_FROM_INT decQuadFromUInt32
kono
parents:
diff changeset
471 #define DEC_FLOAT_TO_INT decQuadToUInt32
kono
parents:
diff changeset
472 #elif INT_KIND == 4
kono
parents:
diff changeset
473 #define INT_TO_DFP DPD_BID_NAME(__dpd_floatunsditd,__bid_floatunsditd)
kono
parents:
diff changeset
474 #define DFP_TO_INT DPD_BID_NAME(__dpd_fixunstddi,__bid_fixunstddi)
kono
parents:
diff changeset
475 #endif
kono
parents:
diff changeset
476 #endif
kono
parents:
diff changeset
477
kono
parents:
diff changeset
478 /* Names of functions to convert between decimal float and binary float. */
kono
parents:
diff changeset
479
kono
parents:
diff changeset
480 #if WIDTH == 32
kono
parents:
diff changeset
481 #if BFP_KIND == 1
kono
parents:
diff changeset
482 #define BFP_TO_DFP DPD_BID_NAME(__dpd_extendsfsd,__bid_extendsfsd)
kono
parents:
diff changeset
483 #define DFP_TO_BFP DPD_BID_NAME(__dpd_truncsdsf,__bid_truncsdsf)
kono
parents:
diff changeset
484 #elif BFP_KIND == 2
kono
parents:
diff changeset
485 #define BFP_TO_DFP DPD_BID_NAME(__dpd_truncdfsd,__bid_truncdfsd)
kono
parents:
diff changeset
486 #define DFP_TO_BFP DPD_BID_NAME(__dpd_extendsddf,__bid_extendsddf)
kono
parents:
diff changeset
487 #elif BFP_KIND == 3
kono
parents:
diff changeset
488 #define BFP_TO_DFP DPD_BID_NAME(__dpd_truncxfsd,__bid_truncxfsd)
kono
parents:
diff changeset
489 #define DFP_TO_BFP DPD_BID_NAME(__dpd_extendsdxf,__bid_extendsdxf)
kono
parents:
diff changeset
490 #elif BFP_KIND == 4
kono
parents:
diff changeset
491 #define BFP_TO_DFP DPD_BID_NAME(__dpd_trunctfsd,__bid_trunctfsd)
kono
parents:
diff changeset
492 #define DFP_TO_BFP DPD_BID_NAME(__dpd_extendsdtf,__bid_extendsdtf)
kono
parents:
diff changeset
493 #endif /* BFP_KIND */
kono
parents:
diff changeset
494
kono
parents:
diff changeset
495 #elif WIDTH == 64
kono
parents:
diff changeset
496 #if BFP_KIND == 1
kono
parents:
diff changeset
497 #define BFP_TO_DFP DPD_BID_NAME(__dpd_extendsfdd,__bid_extendsfdd)
kono
parents:
diff changeset
498 #define DFP_TO_BFP DPD_BID_NAME(__dpd_truncddsf,__bid_truncddsf)
kono
parents:
diff changeset
499 #elif BFP_KIND == 2
kono
parents:
diff changeset
500 #define BFP_TO_DFP DPD_BID_NAME(__dpd_extenddfdd,__bid_extenddfdd)
kono
parents:
diff changeset
501 #define DFP_TO_BFP DPD_BID_NAME(__dpd_truncdddf,__bid_truncdddf)
kono
parents:
diff changeset
502 #elif BFP_KIND == 3
kono
parents:
diff changeset
503 #define BFP_TO_DFP DPD_BID_NAME(__dpd_truncxfdd,__bid_truncxfdd)
kono
parents:
diff changeset
504 #define DFP_TO_BFP DPD_BID_NAME(__dpd_extendddxf,__bid_extendddxf)
kono
parents:
diff changeset
505 #elif BFP_KIND == 4
kono
parents:
diff changeset
506 #define BFP_TO_DFP DPD_BID_NAME(__dpd_trunctfdd,__bid_trunctfdd)
kono
parents:
diff changeset
507 #define DFP_TO_BFP DPD_BID_NAME(__dpd_extendddtf,__bid_extendddtf)
kono
parents:
diff changeset
508 #endif /* BFP_KIND */
kono
parents:
diff changeset
509
kono
parents:
diff changeset
510 #elif WIDTH == 128
kono
parents:
diff changeset
511 #if BFP_KIND == 1
kono
parents:
diff changeset
512 #define BFP_TO_DFP DPD_BID_NAME(__dpd_extendsftd,__bid_extendsftd)
kono
parents:
diff changeset
513 #define DFP_TO_BFP DPD_BID_NAME(__dpd_trunctdsf,__bid_trunctdsf)
kono
parents:
diff changeset
514 #elif BFP_KIND == 2
kono
parents:
diff changeset
515 #define BFP_TO_DFP DPD_BID_NAME(__dpd_extenddftd,__bid_extenddftd)
kono
parents:
diff changeset
516 #define DFP_TO_BFP DPD_BID_NAME(__dpd_trunctddf,__bid_trunctddf)
kono
parents:
diff changeset
517 #elif BFP_KIND == 3
kono
parents:
diff changeset
518 #define BFP_TO_DFP DPD_BID_NAME(__dpd_extendxftd,__bid_extendxftd)
kono
parents:
diff changeset
519 #define DFP_TO_BFP DPD_BID_NAME(__dpd_trunctdxf,__bid_trunctdxf)
kono
parents:
diff changeset
520 #elif BFP_KIND == 4
kono
parents:
diff changeset
521 #define BFP_TO_DFP DPD_BID_NAME(__dpd_extendtftd,__bid_extendtftd)
kono
parents:
diff changeset
522 #define DFP_TO_BFP DPD_BID_NAME(__dpd_trunctdtf,__bid_trunctdtf)
kono
parents:
diff changeset
523 #endif /* BFP_KIND */
kono
parents:
diff changeset
524
kono
parents:
diff changeset
525 #endif /* WIDTH */
kono
parents:
diff changeset
526
kono
parents:
diff changeset
527 /* Some handy typedefs. */
kono
parents:
diff changeset
528
kono
parents:
diff changeset
529 typedef float SFtype __attribute__ ((mode (SF)));
kono
parents:
diff changeset
530 typedef float DFtype __attribute__ ((mode (DF)));
kono
parents:
diff changeset
531 #if LONG_DOUBLE_HAS_XF_MODE
kono
parents:
diff changeset
532 typedef float XFtype __attribute__ ((mode (XF)));
kono
parents:
diff changeset
533 #endif /* LONG_DOUBLE_HAS_XF_MODE */
kono
parents:
diff changeset
534 #if LONG_DOUBLE_HAS_TF_MODE
kono
parents:
diff changeset
535 typedef float TFtype __attribute__ ((mode (TF)));
kono
parents:
diff changeset
536 #endif /* LONG_DOUBLE_HAS_TF_MODE */
kono
parents:
diff changeset
537
kono
parents:
diff changeset
538 typedef int SItype __attribute__ ((mode (SI)));
kono
parents:
diff changeset
539 typedef int DItype __attribute__ ((mode (DI)));
kono
parents:
diff changeset
540 typedef unsigned int USItype __attribute__ ((mode (SI)));
kono
parents:
diff changeset
541 typedef unsigned int UDItype __attribute__ ((mode (DI)));
kono
parents:
diff changeset
542
kono
parents:
diff changeset
543 /* The type of the result of a decimal float comparison. This must
kono
parents:
diff changeset
544 match `__libgcc_cmp_return__' in GCC for the target. */
kono
parents:
diff changeset
545
kono
parents:
diff changeset
546 typedef int CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
kono
parents:
diff changeset
547
kono
parents:
diff changeset
548 /* Prototypes. */
kono
parents:
diff changeset
549
kono
parents:
diff changeset
550 #if defined (L_mul_sd) || defined (L_mul_dd) || defined (L_mul_td)
kono
parents:
diff changeset
551 extern DFP_C_TYPE DFP_MULTIPLY (DFP_C_TYPE, DFP_C_TYPE);
kono
parents:
diff changeset
552 #endif
kono
parents:
diff changeset
553
kono
parents:
diff changeset
554 #if defined (L_div_sd) || defined (L_div_dd) || defined (L_div_td)
kono
parents:
diff changeset
555 extern DFP_C_TYPE DFP_DIVIDE (DFP_C_TYPE, DFP_C_TYPE);
kono
parents:
diff changeset
556 #endif
kono
parents:
diff changeset
557
kono
parents:
diff changeset
558 #if defined (L_addsub_sd) || defined (L_addsub_dd) || defined (L_addsub_td)
kono
parents:
diff changeset
559 extern DFP_C_TYPE DFP_ADD (DFP_C_TYPE, DFP_C_TYPE);
kono
parents:
diff changeset
560 extern DFP_C_TYPE DFP_SUB (DFP_C_TYPE, DFP_C_TYPE);
kono
parents:
diff changeset
561 #endif
kono
parents:
diff changeset
562
kono
parents:
diff changeset
563 #if defined (L_eq_sd) || defined (L_eq_dd) || defined (L_eq_td)
kono
parents:
diff changeset
564 extern CMPtype DFP_EQ (DFP_C_TYPE, DFP_C_TYPE);
kono
parents:
diff changeset
565 #endif
kono
parents:
diff changeset
566
kono
parents:
diff changeset
567 #if defined (L_ne_sd) || defined (L_ne_dd) || defined (L_ne_td)
kono
parents:
diff changeset
568 extern CMPtype DFP_NE (DFP_C_TYPE, DFP_C_TYPE);
kono
parents:
diff changeset
569 #endif
kono
parents:
diff changeset
570
kono
parents:
diff changeset
571 #if defined (L_lt_sd) || defined (L_lt_dd) || defined (L_lt_td)
kono
parents:
diff changeset
572 extern CMPtype DFP_LT (DFP_C_TYPE, DFP_C_TYPE);
kono
parents:
diff changeset
573 #endif
kono
parents:
diff changeset
574
kono
parents:
diff changeset
575 #if defined (L_gt_sd) || defined (L_gt_dd) || defined (L_gt_td)
kono
parents:
diff changeset
576 extern CMPtype DFP_GT (DFP_C_TYPE, DFP_C_TYPE);
kono
parents:
diff changeset
577 #endif
kono
parents:
diff changeset
578
kono
parents:
diff changeset
579 #if defined (L_le_sd) || defined (L_le_dd) || defined (L_le_td)
kono
parents:
diff changeset
580 extern CMPtype DFP_LE (DFP_C_TYPE, DFP_C_TYPE);
kono
parents:
diff changeset
581 #endif
kono
parents:
diff changeset
582
kono
parents:
diff changeset
583 #if defined (L_ge_sd) || defined (L_ge_dd) || defined (L_ge_td)
kono
parents:
diff changeset
584 extern CMPtype DFP_GE (DFP_C_TYPE, DFP_C_TYPE);
kono
parents:
diff changeset
585 #endif
kono
parents:
diff changeset
586
kono
parents:
diff changeset
587 #if defined (L_unord_sd) || defined (L_unord_dd) || defined (L_unord_td)
kono
parents:
diff changeset
588 extern CMPtype DFP_UNORD (DFP_C_TYPE, DFP_C_TYPE);
kono
parents:
diff changeset
589 #endif
kono
parents:
diff changeset
590
kono
parents:
diff changeset
591 #if defined (L_sd_to_dd) || defined (L_sd_to_td) || defined (L_dd_to_sd) \
kono
parents:
diff changeset
592 || defined (L_dd_to_td) || defined (L_td_to_sd) || defined (L_td_to_dd)
kono
parents:
diff changeset
593 extern DFP_C_TYPE_TO DFP_TO_DFP (DFP_C_TYPE);
kono
parents:
diff changeset
594 #endif
kono
parents:
diff changeset
595
kono
parents:
diff changeset
596 #if defined (L_sd_to_si) || defined (L_dd_to_si) || defined (L_td_to_si) \
kono
parents:
diff changeset
597 || defined (L_sd_to_di) || defined (L_dd_to_di) || defined (L_td_to_di) \
kono
parents:
diff changeset
598 || defined (L_sd_to_usi) || defined (L_dd_to_usi) || defined (L_td_to_usi) \
kono
parents:
diff changeset
599 || defined (L_sd_to_udi) || defined (L_dd_to_udi) || defined (L_td_to_udi)
kono
parents:
diff changeset
600 extern INT_TYPE DFP_TO_INT (DFP_C_TYPE);
kono
parents:
diff changeset
601 #endif
kono
parents:
diff changeset
602
kono
parents:
diff changeset
603 #if defined (L_si_to_sd) || defined (L_si_to_dd) || defined (L_si_to_td) \
kono
parents:
diff changeset
604 || defined (L_di_to_sd) || defined (L_di_to_dd) || defined (L_di_to_td) \
kono
parents:
diff changeset
605 || defined (L_usi_to_sd) || defined (L_usi_to_dd) || defined (L_usi_to_td) \
kono
parents:
diff changeset
606 || defined (L_udi_to_sd) || defined (L_udi_to_dd) || defined (L_udi_to_td)
kono
parents:
diff changeset
607 extern DFP_C_TYPE INT_TO_DFP (INT_TYPE);
kono
parents:
diff changeset
608 #endif
kono
parents:
diff changeset
609
kono
parents:
diff changeset
610 #if defined (L_sd_to_sf) || defined (L_dd_to_sf) || defined (L_td_to_sf) \
kono
parents:
diff changeset
611 || defined (L_sd_to_df) || defined (L_dd_to_df) || defined (L_td_to_df) \
kono
parents:
diff changeset
612 || ((defined (L_sd_to_xf) || defined (L_dd_to_xf) || defined (L_td_to_xf)) \
kono
parents:
diff changeset
613 && LONG_DOUBLE_HAS_XF_MODE) \
kono
parents:
diff changeset
614 || ((defined (L_sd_to_tf) || defined (L_dd_to_tf) || defined (L_td_to_tf)) \
kono
parents:
diff changeset
615 && LONG_DOUBLE_HAS_TF_MODE)
kono
parents:
diff changeset
616 extern BFP_TYPE DFP_TO_BFP (DFP_C_TYPE);
kono
parents:
diff changeset
617 #endif
kono
parents:
diff changeset
618
kono
parents:
diff changeset
619 #if defined (L_sf_to_sd) || defined (L_sf_to_dd) || defined (L_sf_to_td) \
kono
parents:
diff changeset
620 || defined (L_df_to_sd) || defined (L_df_to_dd) || defined (L_df_to_td) \
kono
parents:
diff changeset
621 || ((defined (L_xf_to_sd) || defined (L_xf_to_dd) || defined (L_xf_to_td)) \
kono
parents:
diff changeset
622 && LONG_DOUBLE_HAS_XF_MODE) \
kono
parents:
diff changeset
623 || ((defined (L_tf_to_sd) || defined (L_tf_to_dd) || defined (L_tf_to_td)) \
kono
parents:
diff changeset
624 && LONG_DOUBLE_HAS_TF_MODE)
kono
parents:
diff changeset
625 extern DFP_C_TYPE BFP_TO_DFP (BFP_TYPE);
kono
parents:
diff changeset
626 #endif
kono
parents:
diff changeset
627
kono
parents:
diff changeset
628 #endif /* _DFPBIT_H */