]> git.ipfire.org Git - thirdparty/glibc.git/blame - soft-fp/extended.h
soft-fp: Correct _FP_TO_INT formatting.
[thirdparty/glibc.git] / soft-fp / extended.h
CommitLineData
d876f532
UD
1/* Software floating-point emulation.
2 Definitions for IEEE Extended Precision.
d4697bc9 3 Copyright (C) 1999-2014 Free Software Foundation, Inc.
d876f532
UD
4 This file is part of the GNU C Library.
5 Contributed by Jakub Jelinek (jj@ultra.linux.cz).
6
7 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
d876f532 11
638a783c
RM
12 In addition to the permissions in the GNU Lesser General Public
13 License, the Free Software Foundation gives you unlimited
14 permission to link the compiled version of this file into
15 combinations with other programs, and to distribute those
16 combinations without any restriction coming from the use of this
17 file. (The Lesser General Public License restrictions do apply in
18 other respects; for example, they cover modification of the file,
19 and distribution when not linked into a combine executable.)
20
d876f532
UD
21 The GNU C Library is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 24 Lesser General Public License for more details.
d876f532 25
41bdb6e2 26 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
27 License along with the GNU C Library; if not, see
28 <http://www.gnu.org/licenses/>. */
d876f532
UD
29
30#if _FP_W_TYPE_SIZE < 32
71b4dea7 31# error "Here's a nickel, kid. Go buy yourself a real computer."
d876f532
UD
32#endif
33
34#if _FP_W_TYPE_SIZE < 64
71b4dea7
JM
35# define _FP_FRACTBITS_E (4*_FP_W_TYPE_SIZE)
36# define _FP_FRACTBITS_DW_E (8*_FP_W_TYPE_SIZE)
d876f532 37#else
71b4dea7
JM
38# define _FP_FRACTBITS_E (2*_FP_W_TYPE_SIZE)
39# define _FP_FRACTBITS_DW_E (4*_FP_W_TYPE_SIZE)
d876f532
UD
40#endif
41
42#define _FP_FRACBITS_E 64
43#define _FP_FRACXBITS_E (_FP_FRACTBITS_E - _FP_FRACBITS_E)
44#define _FP_WFRACBITS_E (_FP_WORKBITS + _FP_FRACBITS_E)
45#define _FP_WFRACXBITS_E (_FP_FRACTBITS_E - _FP_WFRACBITS_E)
46#define _FP_EXPBITS_E 15
47#define _FP_EXPBIAS_E 16383
48#define _FP_EXPMAX_E 32767
49
50#define _FP_QNANBIT_E \
51ca9e29 51 ((_FP_W_TYPE) 1 << (_FP_FRACBITS_E-2) % _FP_W_TYPE_SIZE)
fe0b1e85 52#define _FP_QNANBIT_SH_E \
51ca9e29 53 ((_FP_W_TYPE) 1 << (_FP_FRACBITS_E-2+_FP_WORKBITS) % _FP_W_TYPE_SIZE)
d876f532 54#define _FP_IMPLBIT_E \
51ca9e29 55 ((_FP_W_TYPE) 1 << (_FP_FRACBITS_E-1) % _FP_W_TYPE_SIZE)
fe0b1e85 56#define _FP_IMPLBIT_SH_E \
51ca9e29 57 ((_FP_W_TYPE) 1 << (_FP_FRACBITS_E-1+_FP_WORKBITS) % _FP_W_TYPE_SIZE)
d876f532 58#define _FP_OVERFLOW_E \
51ca9e29 59 ((_FP_W_TYPE) 1 << (_FP_WFRACBITS_E % _FP_W_TYPE_SIZE))
d876f532 60
77f01ab5
JM
61#define _FP_WFRACBITS_DW_E (2 * _FP_WFRACBITS_E)
62#define _FP_WFRACXBITS_DW_E (_FP_FRACTBITS_DW_E - _FP_WFRACBITS_DW_E)
63#define _FP_HIGHBIT_DW_E \
51ca9e29 64 ((_FP_W_TYPE) 1 << (_FP_WFRACBITS_DW_E - 1) % _FP_W_TYPE_SIZE)
77f01ab5 65
51ca9e29 66typedef float XFtype __attribute__ ((mode (XF)));
fe0b1e85 67
d876f532
UD
68#if _FP_W_TYPE_SIZE < 64
69
70union _FP_UNION_E
71{
1e145589
JM
72 XFtype flt;
73 struct _FP_STRUCT_LAYOUT
74 {
71b4dea7 75# if __BYTE_ORDER == __BIG_ENDIAN
1e145589
JM
76 unsigned long pad1 : _FP_W_TYPE_SIZE;
77 unsigned long pad2 : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E);
78 unsigned long sign : 1;
79 unsigned long exp : _FP_EXPBITS_E;
80 unsigned long frac1 : _FP_W_TYPE_SIZE;
81 unsigned long frac0 : _FP_W_TYPE_SIZE;
71b4dea7 82# else
1e145589
JM
83 unsigned long frac0 : _FP_W_TYPE_SIZE;
84 unsigned long frac1 : _FP_W_TYPE_SIZE;
85 unsigned exp : _FP_EXPBITS_E;
86 unsigned sign : 1;
71b4dea7 87# endif /* not bigendian */
51ca9e29 88 } bits __attribute__ ((packed));
d876f532
UD
89};
90
91
51ca9e29 92# define FP_DECL_E(X) _FP_DECL (4, X)
d876f532 93
9c37ec0b
JM
94# define FP_UNPACK_RAW_E(X, val) \
95 do \
96 { \
97 union _FP_UNION_E FP_UNPACK_RAW_E_flo; \
98 FP_UNPACK_RAW_E_flo.flt = (val); \
99 \
100 X##_f[2] = 0; \
101 X##_f[3] = 0; \
102 X##_f[0] = FP_UNPACK_RAW_E_flo.bits.frac0; \
103 X##_f[1] = FP_UNPACK_RAW_E_flo.bits.frac1; \
104 X##_e = FP_UNPACK_RAW_E_flo.bits.exp; \
105 X##_s = FP_UNPACK_RAW_E_flo.bits.sign; \
106 } \
1e145589
JM
107 while (0)
108
9c37ec0b
JM
109# define FP_UNPACK_RAW_EP(X, val) \
110 do \
111 { \
112 union _FP_UNION_E *FP_UNPACK_RAW_EP_flo \
113 = (union _FP_UNION_E *) (val); \
114 \
115 X##_f[2] = 0; \
116 X##_f[3] = 0; \
117 X##_f[0] = FP_UNPACK_RAW_EP_flo->bits.frac0; \
118 X##_f[1] = FP_UNPACK_RAW_EP_flo->bits.frac1; \
119 X##_e = FP_UNPACK_RAW_EP_flo->bits.exp; \
120 X##_s = FP_UNPACK_RAW_EP_flo->bits.sign; \
121 } \
1e145589
JM
122 while (0)
123
124# define FP_PACK_RAW_E(val, X) \
125 do \
126 { \
9c37ec0b 127 union _FP_UNION_E FP_PACK_RAW_E_flo; \
1e145589
JM
128 \
129 if (X##_e) \
130 X##_f[1] |= _FP_IMPLBIT_E; \
131 else \
132 X##_f[1] &= ~(_FP_IMPLBIT_E); \
9c37ec0b
JM
133 FP_PACK_RAW_E_flo.bits.frac0 = X##_f[0]; \
134 FP_PACK_RAW_E_flo.bits.frac1 = X##_f[1]; \
135 FP_PACK_RAW_E_flo.bits.exp = X##_e; \
136 FP_PACK_RAW_E_flo.bits.sign = X##_s; \
1e145589 137 \
9c37ec0b 138 (val) = FP_PACK_RAW_E_flo.flt; \
1e145589
JM
139 } \
140 while (0)
141
9c37ec0b
JM
142# define FP_PACK_RAW_EP(val, X) \
143 do \
144 { \
145 if (!FP_INHIBIT_RESULTS) \
146 { \
147 union _FP_UNION_E *FP_PACK_RAW_EP_flo \
148 = (union _FP_UNION_E *) (val); \
149 \
150 if (X##_e) \
151 X##_f[1] |= _FP_IMPLBIT_E; \
152 else \
153 X##_f[1] &= ~(_FP_IMPLBIT_E); \
154 FP_PACK_RAW_EP_flo->bits.frac0 = X##_f[0]; \
155 FP_PACK_RAW_EP_flo->bits.frac1 = X##_f[1]; \
156 FP_PACK_RAW_EP_flo->bits.exp = X##_e; \
157 FP_PACK_RAW_EP_flo->bits.sign = X##_s; \
158 } \
159 } \
1e145589
JM
160 while (0)
161
51ca9e29 162# define FP_UNPACK_E(X, val) \
1e145589
JM
163 do \
164 { \
51ca9e29
JM
165 FP_UNPACK_RAW_E (X, val); \
166 _FP_UNPACK_CANONICAL (E, 4, X); \
1e145589
JM
167 } \
168 while (0)
169
51ca9e29 170# define FP_UNPACK_EP(X, val) \
1e145589
JM
171 do \
172 { \
51ca9e29
JM
173 FP_UNPACK_RAW_EP (X, val); \
174 _FP_UNPACK_CANONICAL (E, 4, X); \
1e145589
JM
175 } \
176 while (0)
177
51ca9e29 178# define FP_UNPACK_SEMIRAW_E(X, val) \
1e145589
JM
179 do \
180 { \
51ca9e29
JM
181 FP_UNPACK_RAW_E (X, val); \
182 _FP_UNPACK_SEMIRAW (E, 4, X); \
1e145589
JM
183 } \
184 while (0)
185
51ca9e29 186# define FP_UNPACK_SEMIRAW_EP(X, val) \
1e145589
JM
187 do \
188 { \
51ca9e29
JM
189 FP_UNPACK_RAW_EP (X, val); \
190 _FP_UNPACK_SEMIRAW (E, 4, X); \
1e145589
JM
191 } \
192 while (0)
193
51ca9e29 194# define FP_PACK_E(val, X) \
1e145589
JM
195 do \
196 { \
51ca9e29
JM
197 _FP_PACK_CANONICAL (E, 4, X); \
198 FP_PACK_RAW_E (val, X); \
1e145589
JM
199 } \
200 while (0)
201
51ca9e29 202# define FP_PACK_EP(val, X) \
1e145589
JM
203 do \
204 { \
51ca9e29
JM
205 _FP_PACK_CANONICAL (E, 4, X); \
206 FP_PACK_RAW_EP (val, X); \
1e145589
JM
207 } \
208 while (0)
209
51ca9e29 210# define FP_PACK_SEMIRAW_E(val, X) \
1e145589
JM
211 do \
212 { \
51ca9e29
JM
213 _FP_PACK_SEMIRAW (E, 4, X); \
214 FP_PACK_RAW_E (val, X); \
1e145589
JM
215 } \
216 while (0)
217
51ca9e29 218# define FP_PACK_SEMIRAW_EP(val, X) \
1e145589
JM
219 do \
220 { \
51ca9e29
JM
221 _FP_PACK_SEMIRAW (E, 4, X); \
222 FP_PACK_RAW_EP (val, X); \
1e145589
JM
223 } \
224 while (0)
fe0b1e85 225
51ca9e29
JM
226# define FP_ISSIGNAN_E(X) _FP_ISSIGNAN (E, 4, X)
227# define FP_NEG_E(R, X) _FP_NEG (E, 4, R, X)
228# define FP_ADD_E(R, X, Y) _FP_ADD (E, 4, R, X, Y)
229# define FP_SUB_E(R, X, Y) _FP_SUB (E, 4, R, X, Y)
230# define FP_MUL_E(R, X, Y) _FP_MUL (E, 4, R, X, Y)
231# define FP_DIV_E(R, X, Y) _FP_DIV (E, 4, R, X, Y)
232# define FP_SQRT_E(R, X) _FP_SQRT (E, 4, R, X)
233# define FP_FMA_E(R, X, Y, Z) _FP_FMA (E, 4, 8, R, X, Y, Z)
d876f532
UD
234
235/*
236 * Square root algorithms:
237 * We have just one right now, maybe Newton approximation
238 * should be added for those machines where division is fast.
239 * This has special _E version because standard _4 square
240 * root would not work (it has to start normally with the
241 * second word and not the first), but as we have to do it
242 * anyway, we optimize it by doing most of the calculations
243 * in two UWtype registers instead of four.
244 */
9c84384c 245
71b4dea7 246# define _FP_SQRT_MEAT_E(R, S, T, X, q) \
1e145589
JM
247 do \
248 { \
51ca9e29
JM
249 q = (_FP_W_TYPE) 1 << (_FP_W_TYPE_SIZE - 1); \
250 _FP_FRAC_SRL_4 (X, (_FP_WORKBITS)); \
1e145589
JM
251 while (q) \
252 { \
253 T##_f[1] = S##_f[1] + q; \
254 if (T##_f[1] <= X##_f[1]) \
255 { \
256 S##_f[1] = T##_f[1] + q; \
257 X##_f[1] -= T##_f[1]; \
258 R##_f[1] += q; \
259 } \
51ca9e29 260 _FP_FRAC_SLL_2 (X, 1); \
1e145589
JM
261 q >>= 1; \
262 } \
51ca9e29 263 q = (_FP_W_TYPE) 1 << (_FP_W_TYPE_SIZE - 1); \
1e145589
JM
264 while (q) \
265 { \
266 T##_f[0] = S##_f[0] + q; \
267 T##_f[1] = S##_f[1]; \
268 if (T##_f[1] < X##_f[1] \
269 || (T##_f[1] == X##_f[1] \
270 && T##_f[0] <= X##_f[0])) \
271 { \
272 S##_f[0] = T##_f[0] + q; \
273 S##_f[1] += (T##_f[0] > S##_f[0]); \
51ca9e29 274 _FP_FRAC_DEC_2 (X, T); \
1e145589
JM
275 R##_f[0] += q; \
276 } \
51ca9e29 277 _FP_FRAC_SLL_2 (X, 1); \
1e145589
JM
278 q >>= 1; \
279 } \
51ca9e29 280 _FP_FRAC_SLL_4 (R, (_FP_WORKBITS)); \
1e145589
JM
281 if (X##_f[0] | X##_f[1]) \
282 { \
283 if (S##_f[1] < X##_f[1] \
284 || (S##_f[1] == X##_f[1] \
285 && S##_f[0] < X##_f[0])) \
286 R##_f[0] |= _FP_WORK_ROUND; \
287 R##_f[0] |= _FP_WORK_STICKY; \
288 } \
289 } \
290 while (0)
d876f532 291
51ca9e29
JM
292# define FP_CMP_E(r, X, Y, un) _FP_CMP (E, 4, r, X, Y, un)
293# define FP_CMP_EQ_E(r, X, Y) _FP_CMP_EQ (E, 4, r, X, Y)
294# define FP_CMP_UNORD_E(r, X, Y) _FP_CMP_UNORD (E, 4, r, X, Y)
d876f532 295
51ca9e29
JM
296# define FP_TO_INT_E(r, X, rsz, rsg) _FP_TO_INT (E, 4, r, X, rsz, rsg)
297# define FP_FROM_INT_E(X, r, rs, rt) _FP_FROM_INT (E, 4, X, r, rs, rt)
d876f532 298
71b4dea7
JM
299# define _FP_FRAC_HIGH_E(X) (X##_f[2])
300# define _FP_FRAC_HIGH_RAW_E(X) (X##_f[1])
d876f532 301
71b4dea7 302# define _FP_FRAC_HIGH_DW_E(X) (X##_f[4])
77f01ab5 303
d876f532
UD
304#else /* not _FP_W_TYPE_SIZE < 64 */
305union _FP_UNION_E
306{
fe0b1e85 307 XFtype flt;
1e145589
JM
308 struct _FP_STRUCT_LAYOUT
309 {
71b4dea7 310# if __BYTE_ORDER == __BIG_ENDIAN
06029c20
JJ
311 _FP_W_TYPE pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E);
312 unsigned sign : 1;
313 unsigned exp : _FP_EXPBITS_E;
314 _FP_W_TYPE frac : _FP_W_TYPE_SIZE;
71b4dea7 315# else
06029c20
JJ
316 _FP_W_TYPE frac : _FP_W_TYPE_SIZE;
317 unsigned exp : _FP_EXPBITS_E;
318 unsigned sign : 1;
71b4dea7 319# endif
d876f532
UD
320 } bits;
321};
322
51ca9e29 323# define FP_DECL_E(X) _FP_DECL (2, X)
d876f532 324
1e145589
JM
325# define FP_UNPACK_RAW_E(X, val) \
326 do \
327 { \
9c37ec0b
JM
328 union _FP_UNION_E FP_UNPACK_RAW_E_flo; \
329 FP_UNPACK_RAW_E_flo.flt = (val); \
1e145589 330 \
9c37ec0b 331 X##_f0 = FP_UNPACK_RAW_E_flo.bits.frac; \
1e145589 332 X##_f1 = 0; \
9c37ec0b
JM
333 X##_e = FP_UNPACK_RAW_E_flo.bits.exp; \
334 X##_s = FP_UNPACK_RAW_E_flo.bits.sign; \
1e145589
JM
335 } \
336 while (0)
d876f532 337
9c37ec0b
JM
338# define FP_UNPACK_RAW_EP(X, val) \
339 do \
340 { \
341 union _FP_UNION_E *FP_UNPACK_RAW_EP_flo \
342 = (union _FP_UNION_E *) (val); \
343 \
344 X##_f0 = FP_UNPACK_RAW_EP_flo->bits.frac; \
345 X##_f1 = 0; \
346 X##_e = FP_UNPACK_RAW_EP_flo->bits.exp; \
347 X##_s = FP_UNPACK_RAW_EP_flo->bits.sign; \
348 } \
1e145589
JM
349 while (0)
350
351# define FP_PACK_RAW_E(val, X) \
352 do \
353 { \
9c37ec0b 354 union _FP_UNION_E FP_PACK_RAW_E_flo; \
1e145589
JM
355 \
356 if (X##_e) \
357 X##_f0 |= _FP_IMPLBIT_E; \
358 else \
359 X##_f0 &= ~(_FP_IMPLBIT_E); \
9c37ec0b
JM
360 FP_PACK_RAW_E_flo.bits.frac = X##_f0; \
361 FP_PACK_RAW_E_flo.bits.exp = X##_e; \
362 FP_PACK_RAW_E_flo.bits.sign = X##_s; \
1e145589 363 \
9c37ec0b 364 (val) = FP_PACK_RAW_E_flo.flt; \
1e145589
JM
365 } \
366 while (0)
d876f532 367
9c37ec0b
JM
368# define FP_PACK_RAW_EP(fs, val, X) \
369 do \
370 { \
371 if (!FP_INHIBIT_RESULTS) \
372 { \
373 union _FP_UNION_E *FP_PACK_RAW_EP_flo \
374 = (union _FP_UNION_E *) (val); \
375 \
376 if (X##_e) \
377 X##_f0 |= _FP_IMPLBIT_E; \
378 else \
379 X##_f0 &= ~(_FP_IMPLBIT_E); \
380 FP_PACK_RAW_EP_flo->bits.frac = X##_f0; \
381 FP_PACK_RAW_EP_flo->bits.exp = X##_e; \
382 FP_PACK_RAW_EP_flo->bits.sign = X##_s; \
383 } \
384 } \
1e145589
JM
385 while (0)
386
387
51ca9e29 388# define FP_UNPACK_E(X, val) \
1e145589
JM
389 do \
390 { \
51ca9e29
JM
391 FP_UNPACK_RAW_E (X, val); \
392 _FP_UNPACK_CANONICAL (E, 2, X); \
1e145589
JM
393 } \
394 while (0)
395
51ca9e29 396# define FP_UNPACK_EP(X, val) \
1e145589
JM
397 do \
398 { \
51ca9e29
JM
399 FP_UNPACK_RAW_EP (X, val); \
400 _FP_UNPACK_CANONICAL (E, 2, X); \
1e145589
JM
401 } \
402 while (0)
403
51ca9e29 404# define FP_UNPACK_SEMIRAW_E(X, val) \
1e145589
JM
405 do \
406 { \
51ca9e29
JM
407 FP_UNPACK_RAW_E (X, val); \
408 _FP_UNPACK_SEMIRAW (E, 2, X); \
1e145589
JM
409 } \
410 while (0)
411
51ca9e29 412# define FP_UNPACK_SEMIRAW_EP(X, val) \
1e145589
JM
413 do \
414 { \
51ca9e29
JM
415 FP_UNPACK_RAW_EP (X, val); \
416 _FP_UNPACK_SEMIRAW (E, 2, X); \
1e145589
JM
417 } \
418 while (0)
419
51ca9e29 420# define FP_PACK_E(val, X) \
1e145589
JM
421 do \
422 { \
51ca9e29
JM
423 _FP_PACK_CANONICAL (E, 2, X); \
424 FP_PACK_RAW_E (val, X); \
1e145589
JM
425 } \
426 while (0)
427
51ca9e29 428# define FP_PACK_EP(val, X) \
1e145589
JM
429 do \
430 { \
51ca9e29
JM
431 _FP_PACK_CANONICAL (E, 2, X); \
432 FP_PACK_RAW_EP (val, X); \
1e145589
JM
433 } \
434 while (0)
435
51ca9e29 436# define FP_PACK_SEMIRAW_E(val, X) \
1e145589
JM
437 do \
438 { \
51ca9e29
JM
439 _FP_PACK_SEMIRAW (E, 2, X); \
440 FP_PACK_RAW_E (val, X); \
1e145589
JM
441 } \
442 while (0)
443
51ca9e29 444# define FP_PACK_SEMIRAW_EP(val, X) \
1e145589
JM
445 do \
446 { \
51ca9e29
JM
447 _FP_PACK_SEMIRAW (E, 2, X); \
448 FP_PACK_RAW_EP (val, X); \
1e145589
JM
449 } \
450 while (0)
fe0b1e85 451
51ca9e29
JM
452# define FP_ISSIGNAN_E(X) _FP_ISSIGNAN (E, 2, X)
453# define FP_NEG_E(R, X) _FP_NEG (E, 2, R, X)
454# define FP_ADD_E(R, X, Y) _FP_ADD (E, 2, R, X, Y)
455# define FP_SUB_E(R, X, Y) _FP_SUB (E, 2, R, X, Y)
456# define FP_MUL_E(R, X, Y) _FP_MUL (E, 2, R, X, Y)
457# define FP_DIV_E(R, X, Y) _FP_DIV (E, 2, R, X, Y)
458# define FP_SQRT_E(R, X) _FP_SQRT (E, 2, R, X)
459# define FP_FMA_E(R, X, Y, Z) _FP_FMA (E, 2, 4, R, X, Y, Z)
d876f532
UD
460
461/*
462 * Square root algorithms:
463 * We have just one right now, maybe Newton approximation
464 * should be added for those machines where division is fast.
465 * We optimize it by doing most of the calculations
466 * in one UWtype registers instead of two, although we don't
467 * have to.
468 */
71b4dea7 469# define _FP_SQRT_MEAT_E(R, S, T, X, q) \
1e145589
JM
470 do \
471 { \
51ca9e29
JM
472 q = (_FP_W_TYPE) 1 << (_FP_W_TYPE_SIZE - 1); \
473 _FP_FRAC_SRL_2 (X, (_FP_WORKBITS)); \
1e145589
JM
474 while (q) \
475 { \
476 T##_f0 = S##_f0 + q; \
477 if (T##_f0 <= X##_f0) \
478 { \
479 S##_f0 = T##_f0 + q; \
480 X##_f0 -= T##_f0; \
481 R##_f0 += q; \
482 } \
51ca9e29 483 _FP_FRAC_SLL_1 (X, 1); \
1e145589
JM
484 q >>= 1; \
485 } \
51ca9e29 486 _FP_FRAC_SLL_2 (R, (_FP_WORKBITS)); \
1e145589
JM
487 if (X##_f0) \
488 { \
489 if (S##_f0 < X##_f0) \
490 R##_f0 |= _FP_WORK_ROUND; \
491 R##_f0 |= _FP_WORK_STICKY; \
492 } \
493 } \
494 while (0)
9c84384c 495
51ca9e29
JM
496# define FP_CMP_E(r, X, Y, un) _FP_CMP (E, 2, r, X, Y, un)
497# define FP_CMP_EQ_E(r, X, Y) _FP_CMP_EQ (E, 2, r, X, Y)
498# define FP_CMP_UNORD_E(r, X, Y) _FP_CMP_UNORD (E, 2, r, X, Y)
d876f532 499
51ca9e29
JM
500# define FP_TO_INT_E(r, X, rsz, rsg) _FP_TO_INT (E, 2, r, X, rsz, rsg)
501# define FP_FROM_INT_E(X, r, rs, rt) _FP_FROM_INT (E, 2, X, r, rs, rt)
d876f532 502
71b4dea7
JM
503# define _FP_FRAC_HIGH_E(X) (X##_f1)
504# define _FP_FRAC_HIGH_RAW_E(X) (X##_f0)
d876f532 505
71b4dea7 506# define _FP_FRAC_HIGH_DW_E(X) (X##_f[2])
77f01ab5 507
d876f532 508#endif /* not _FP_W_TYPE_SIZE < 64 */