1 #include "dfp-dbg.h"
2 
3 /* Macros are set up to skip using long double, which doesn't necessarily
4    map to TF mode.  If there's a reason to skip those for a test, the
5    test itself can define USE_TF to be zero.  */
6 #ifndef USE_TF
7 #define USE_TF 1
8 #endif
9 
10 /* Provide more information with FAILURE than what is available with
11    the version of that macro in dfp-dbg.h.  */
12 
13 #undef FAILURE
14 #if defined(DBG) || defined(DBG2)
15 #include <stdio.h>
16 #define FAILURE(NUM) \
17   { printf ("failed for test %s\n", NUM); failures++; }
18 #else
19 #define FAILURE(N) __builtin_abort ();
20 #endif
21 
22 /* This is useful when modifying the test to make sure that tests are
23    actually run.  */
24 #if defined(DBG2)
25 #define REPORT(NUM) \
26   { printf ("%s\n", NUM); }
27 #else
28 #define REPORT(N) ;
29 #endif
30 
31 #define CONVERT_VALID(NUM,FROM,TO,FROMVAL,TOVAL,DIFF)		\
32 void								\
33 convert_##NUM (void)						\
34 {								\
35   REPORT(#NUM " " #FROMVAL)					\
36   FROM = FROMVAL;						\
37   TO = FROM;							\
38   if (TO < (TOVAL - DIFF) || TO > (TOVAL + DIFF))		\
39     FAILURE (#NUM);						\
40 }
41 
42 #define CONVERT_TO_PINF(NUM,FROM,TO,FROMVAL,TOSUFFIX)		\
43 void								\
44 convert_##NUM (void)						\
45 {								\
46   REPORT(#NUM " " #FROMVAL)					\
47   FROM = FROMVAL;						\
48   TO = FROM;							\
49   if (__builtin_isinf##TOSUFFIX (TO) == 0)			\
50     FAILURE (#NUM " pinf: isinf");				\
51   if (__builtin_signbit##TOSUFFIX (TO) != 0)			\
52     FAILURE (#NUM " pinf: sign");				\
53 }
54 
55 #define CONVERT_TO_MINF(NUM,FROM,TO,FROMVAL,TOSUFFIX)		\
56 void								\
57 convert_##NUM (void)						\
58 {								\
59   REPORT(#NUM " " #FROMVAL)					\
60   FROM = FROMVAL;						\
61   TO = FROM;							\
62   if (__builtin_isinf##TOSUFFIX (TO) == 0)			\
63     FAILURE (#NUM " pinf: isinf");				\
64   if (__builtin_signbit##TOSUFFIX (TO) == 0)			\
65     FAILURE (#NUM " pinf: sign");				\
66 }
67 
68 #define CONVERT_TO_PZERO(NUM,FROM,TO,FROMVAL,TOVAL,TOSUFFIX)	\
69 void								\
70 convert_##NUM (void)						\
71 {								\
72   REPORT(#NUM " " #FROMVAL)					\
73   FROM = FROMVAL;						\
74   TO = FROM;							\
75   if (TO != TOVAL)						\
76     FAILURE (#NUM "_pzero: zero")				\
77   if (__builtin_signbit##TOSUFFIX (TO) != 0)			\
78     FAILURE (#NUM " _pzero: sign");				\
79 }
80 
81 #define CONVERT_TO_MZERO(NUM,FROM,TO,FROMVAL,TOVAL,TOSUFFIX)	\
82 void								\
83 convert_##NUM (void)						\
84 {								\
85   REPORT(#NUM " " #FROMVAL)					\
86   FROM = FROMVAL;						\
87   TO = FROM;							\
88   if (TO != TOVAL)						\
89     FAILURE (#NUM "_mzero: zero")				\
90   if (__builtin_signbit##TOSUFFIX (TO) == 0)			\
91     FAILURE (#NUM " _mzero: sign");				\
92 }
93 
94 #define CONVERT_NAN(NUM,FROM,TO,FROMSUFFIX,TOSUFFIX)		\
95 void								\
96 convert_##NUM##_nan (void)					\
97 {								\
98   REPORT(#NUM "_nan")						\
99   FROM = __builtin_nan##FROMSUFFIX ("");			\
100   TO = FROM;							\
101   if (__builtin_isnan##TOSUFFIX (TO) == 0)			\
102     FAILURE (#NUM " nan");					\
103 }
104 
105 #define CONVERT_PINF(NUM,FROM,TO,FROMSUFFIX,TOSUFFIX)		\
106 void								\
107 convert_##NUM##_pinf (void)					\
108 {								\
109   REPORT (#NUM "_pinf")						\
110   FROM = __builtin_inf##FROMSUFFIX ();				\
111   TO = FROM;							\
112   if (__builtin_isinf##TOSUFFIX (TO) == 0)			\
113     FAILURE (#NUM " pinf: isinf");				\
114   if (__builtin_signbit##TOSUFFIX (TO) != 0)			\
115     FAILURE (#NUM " pinf: sign");				\
116 }
117 
118 #define CONVERT_MINF(NUM,FROM,TO,FROMSUFFIX,TOSUFFIX)		\
119 void								\
120 convert_##NUM##_minf (void)					\
121 {								\
122   REPORT (#NUM "_minf")						\
123   FROM = -__builtin_inf##FROMSUFFIX ();				\
124   TO = FROM;							\
125   if (__builtin_isinf##TOSUFFIX (TO) == 0)			\
126     FAILURE (#NUM " minf: isinf");				\
127   if (__builtin_signbit##TOSUFFIX (TO) == 0)			\
128     FAILURE (#NUM " minf: sign");				\
129 }
130 
131 #define CONVERT_PZERO(NUM,FROM,TO,FROMVALUE,TOVALUE,TOSUFFIX)	\
132 void								\
133 convert_##NUM##_pzero (void)					\
134 {								\
135   REPORT (#NUM "_pzero")					\
136   FROM = FROMVALUE;						\
137   TO = FROM;							\
138   if (TO != TOVALUE)						\
139     FAILURE (#NUM "pzero: zero")				\
140   if (__builtin_signbit##TOSUFFIX (TO) != 0)			\
141     FAILURE (#NUM " pzero: sign");				\
142 }
143 
144 #define CONVERT_MZERO(NUM,FROM,TO,FROMVALUE,TOVALUE,TOSUFFIX)	\
145 void								\
146 convert_##NUM##_mzero (void)					\
147 {								\
148   REPORT (#NUM "_mzero")					\
149   FROM = FROMVALUE;						\
150   TO = FROM;							\
151   if (TO != TOVALUE)						\
152     FAILURE (#NUM "mzero: zero")				\
153   if (__builtin_signbit##TOSUFFIX (TO) == 0)			\
154     FAILURE (#NUM " mzero: sign");				\
155 }
156 
157 #define CONVERT_VALID_NOTF(NUM,VAL,DIFF)			\
158 CONVERT_VALID (NUM##_sdsf, sd, sf, VAL##df, VAL##f, DIFF##f)	\
159 CONVERT_VALID (NUM##_sddf, sd, df, VAL##df, VAL, DIFF)		\
160 CONVERT_VALID (NUM##_ddsf, dd, sf, VAL##dd, VAL##f, DIFF##f)	\
161 CONVERT_VALID (NUM##_dddf, dd, df, VAL##dd, VAL, DIFF)		\
162 CONVERT_VALID (NUM##_tdsf, td, sf, VAL##dl, VAL##f, DIFF##f)	\
163 CONVERT_VALID (NUM##_tddf, td, df, VAL##dl, VAL, DIFF)		\
164 CONVERT_VALID (NUM##_sfsd, sf, sd, VAL##f, VAL##df, DIFF##df)	\
165 CONVERT_VALID (NUM##_sfdd, sf, dd, VAL##f, VAL##dd, DIFF##dd)	\
166 CONVERT_VALID (NUM##_sftd, sf, td, VAL##f, VAL##dl, DIFF##dl)	\
167 CONVERT_VALID (NUM##_dfsd, df, sd, VAL, VAL##df, DIFF##df)	\
168 CONVERT_VALID (NUM##_dfdd, df, dd, VAL, VAL##dd, DIFF##dd)	\
169 CONVERT_VALID (NUM##_dftd, df, td, VAL, VAL##dl, DIFF##dl)	\
170 CONVERT_VALID (NUM##_sddd, sd, dd, VAL##df, VAL##dd, DIFF##dd)	\
171 CONVERT_VALID (NUM##_sdtd, sd, dd, VAL##df, VAL##dd, DIFF##dd)	\
172 CONVERT_VALID (NUM##_ddsd, dd, sd, VAL##dd, VAL##df, DIFF##dd)	\
173 CONVERT_VALID (NUM##_ddtd, dd, td, VAL##dd, VAL##dl, DIFF##dl)	\
174 CONVERT_VALID (NUM##_tdsd, td, sd, VAL##dl, VAL##df, DIFF##df)	\
175 CONVERT_VALID (NUM##_tddd, td, dd, VAL##dl, VAL##dd, DIFF##dd)
176 
177 #if USE_TF == 0
178 #define CONVERT_VALID_TF(NUM,VAL,DIFF)
179 #else
180 #define CONVERT_VALID_TF(NUM,VAL,DIFF)				\
181 CONVERT_VALID (NUM##_sdtf, sd, tf, VAL##df, VAL##l, DIFF##l)	\
182 CONVERT_VALID (NUM##_tdtf, td, tf, VAL##dl, VAL##l, DIFF##l)	\
183 CONVERT_VALID (NUM##_ddtf, dd, tf, VAL##dd, VAL##l, DIFF##l)	\
184 CONVERT_VALID (NUM##_tfsd, tf, sd, VAL##l, VAL##df, DIFF##df)	\
185 CONVERT_VALID (NUM##_tfdd, tf, dd, VAL##l, VAL##dd, DIFF##dd)	\
186 CONVERT_VALID (NUM##_tftd, tf, td, VAL##l, VAL##dl, DIFF##dl)
187 #endif
188 
189 #define CONVERT_VALID_ALL(NUM,VAL,DIFF)				\
190   CONVERT_VALID_NOTF(NUM,VAL,DIFF)				\
191   CONVERT_VALID_TF(NUM,VAL,DIFF)
192 
193 #define CALL_VALID_NOTF(NUM)					\
194   convert_##NUM##_sdsf ();					\
195   convert_##NUM##_sddf ();					\
196   convert_##NUM##_ddsf ();					\
197   convert_##NUM##_dddf ();					\
198   convert_##NUM##_tdsf ();					\
199   convert_##NUM##_tddf ();					\
200   convert_##NUM##_sfsd ();					\
201   convert_##NUM##_sfdd ();					\
202   convert_##NUM##_sftd ();					\
203   convert_##NUM##_dfsd ();					\
204   convert_##NUM##_dfdd ();					\
205   convert_##NUM##_dftd ();					\
206   convert_##NUM##_sddd ();					\
207   convert_##NUM##_sdtd ();					\
208   convert_##NUM##_ddsd ();					\
209   convert_##NUM##_ddtd ();					\
210   convert_##NUM##_tdsd ();					\
211   convert_##NUM##_tddd ();
212 
213 #if USE_TF == 0
214 #define CALL_VALID_TF(NUM)
215 #else
216 #define CALL_VALID_TF(NUM)					\
217   convert_##NUM##_sdtf ();					\
218   convert_##NUM##_ddtf ();					\
219   convert_##NUM##_tdtf ();					\
220   convert_##NUM##_tfsd ();					\
221   convert_##NUM##_tfdd ();					\
222   convert_##NUM##_tftd ();
223 #endif
224 
225 #define CALL_VALID_ALL(NUM)					\
226   CALL_VALID_NOTF(NUM)						\
227   CALL_VALID_TF(NUM)
228 
229 #define CONVERT_ZEROES(NUM,FROM,TO,FROMVALUE,TOVALUE,TOSUFFIX)	\
230 CONVERT_PZERO(NUM, FROM, TO, FROMVALUE, TOVALUE, TOSUFFIX)	\
231 CONVERT_MZERO(NUM, FROM, TO, -FROMVALUE, -TOVALUE, TOSUFFIX)
232 
233 #define CONVERT_ZEROES_NOTF(NUM)				\
234 CONVERT_ZEROES (NUM##_sdsf, sd, sf, 0.0df, 0.0f, f)		\
235 CONVERT_ZEROES (NUM##_sddf, sd, df, 0.0df, 0.0, )		\
236 CONVERT_ZEROES (NUM##_ddsf, dd, sf, 0.0dd, 0.0f, f)		\
237 CONVERT_ZEROES (NUM##_dddf, dd, df, 0.0dd, 0.0, )		\
238 CONVERT_ZEROES (NUM##_tdsf, td, sf, 0.0dl, 0.0f, f)		\
239 CONVERT_ZEROES (NUM##_tddf, td, df, 0.0dl, 0.0, )		\
240 CONVERT_ZEROES (NUM##_sfsd, sf, sd, 0.0f, 0.0df, d32)		\
241 CONVERT_ZEROES (NUM##_sfdd, sf, dd, 0.0f, 0.0dd, d64)		\
242 CONVERT_ZEROES (NUM##_sftd, sf, td, 0.0f, 0.0dl, d128)		\
243 CONVERT_ZEROES (NUM##_dfsd, df, sd, 0.0, 0.0df, d32)		\
244 CONVERT_ZEROES (NUM##_dfdd, df, dd, 0.0, 0.0dd, d64)		\
245 CONVERT_ZEROES (NUM##_dftd, df, td, 0.0, 0.0dl, d128)		\
246 CONVERT_ZEROES (NUM##_sddd, sd, dd, 0.0df, 0.0dd, d64)		\
247 CONVERT_ZEROES (NUM##_sdtd, sd, td, 0.0dl, 0.0dl, d128)		\
248 CONVERT_ZEROES (NUM##_ddsd, dd, sd, 0.0dd, 0.0df, d32)		\
249 CONVERT_ZEROES (NUM##_ddtd, dd, td, 0.0dd, 0.0dl, d128)		\
250 CONVERT_ZEROES (NUM##_tdsd, td, sd, 0.0dl, 0.0df, d32)		\
251 CONVERT_ZEROES (NUM##_tddd, td, dd, 0.0dl, 0.0dd, d64)
252 
253 #if USE_TF == 0
254 #define CONVERT_ZEROES_TF(NUM)
255 #else
256 #define CONVERT_ZEROES_TF(NUM)					\
257 CONVERT_ZEROES (NUM##_sdtf, sd, tf, 0.0df, 0.0l, l)		\
258 CONVERT_ZEROES (NUM##_ddtf, dd, tf, 0.0dd, 0.0l, l)		\
259 CONVERT_ZEROES (NUM##_tdtf, td, tf, 0.0dl, 0.0l, l)		\
260 CONVERT_ZEROES (NUM##_tfsd, tf, sd, 0.0l, 0.0df, d32)		\
261 CONVERT_ZEROES (NUM##_tfdd, tf, dd, 0.0l, 0.0dd, d64)		\
262 CONVERT_ZEROES (NUM##_tftd, tf, td, 0.0l, 0.0dl, d128)
263 #endif
264 
265 #define CONVERT_ZEROES_ALL(NUM)					\
266   CONVERT_ZEROES_NOTF(NUM)					\
267   CONVERT_ZEROES_TF(NUM)
268 
269 #define CALL_ZEROES(NUM)					\
270   convert_##NUM##_pzero ();					\
271   convert_##NUM##_mzero ();
272 
273 #define CALL_ZEROES_NOTF(NUM)					\
274   CALL_ZEROES (NUM##_sdsf)					\
275   CALL_ZEROES (NUM##_sddf)					\
276   CALL_ZEROES (NUM##_ddsf)					\
277   CALL_ZEROES (NUM##_dddf)					\
278   CALL_ZEROES (NUM##_tdsf)					\
279   CALL_ZEROES (NUM##_tddf)					\
280   CALL_ZEROES (NUM##_sfsd)					\
281   CALL_ZEROES (NUM##_sfdd)					\
282   CALL_ZEROES (NUM##_sftd)					\
283   CALL_ZEROES (NUM##_dfsd)					\
284   CALL_ZEROES (NUM##_dfdd)					\
285   CALL_ZEROES (NUM##_dftd)					\
286   CALL_ZEROES (NUM##_sddd)					\
287   CALL_ZEROES (NUM##_sdtd)					\
288   CALL_ZEROES (NUM##_ddsd)					\
289   CALL_ZEROES (NUM##_ddtd)					\
290   CALL_ZEROES (NUM##_tdsd)					\
291   CALL_ZEROES (NUM##_tddd)
292 
293 #if USE_TF == 0
294 #define CALL_ZEROES_TF(NUM)
295 #else
296 #define CALL_ZEROES_TF(NUM)					\
297   CALL_ZEROES (NUM##_sdtf)					\
298   CALL_ZEROES (NUM##_ddtf)					\
299   CALL_ZEROES (NUM##_tdtf)					\
300   CALL_ZEROES (NUM##_tfsd)					\
301   CALL_ZEROES (NUM##_tfdd)					\
302   CALL_ZEROES (NUM##_tftd)
303 #endif
304 
305 #define CALL_ZEROES_ALL(NUM)					\
306   CALL_ZEROES_NOTF(NUM)						\
307   CALL_ZEROES_TF(NUM)
308 
309 #define CONVERT_INF(NUM,FROM,TO,FROMSUFFIX,TOSUFFIX)		\
310 CONVERT_PINF (NUM, FROM, TO, FROMSUFFIX, TOSUFFIX)		\
311 CONVERT_MINF (NUM, FROM, TO, FROMSUFFIX, TOSUFFIX)
312 
313 #define CONVERT_INF_NOTF(NUM)					\
314 CONVERT_INF (NUM##_sdsf, sd, sf, d32, f)			\
315 CONVERT_INF (NUM##_sddf, sd, df, d32, )				\
316 CONVERT_INF (NUM##_ddsf, dd, sf, d64, f)			\
317 CONVERT_INF (NUM##_dddf, dd, df, d64, )				\
318 CONVERT_INF (NUM##_tdsf, td, sf, d128, f)			\
319 CONVERT_INF (NUM##_tddf, td, df, d128, )			\
320 CONVERT_INF (NUM##_sfsd, sf, sd, f, d32)			\
321 CONVERT_INF (NUM##_sfdd, sf, dd, f, d64)			\
322 CONVERT_INF (NUM##_sftd, sf, td, f, d128)			\
323 CONVERT_INF (NUM##_dfsd, df, sd, , d32)				\
324 CONVERT_INF (NUM##_dfdd, df, dd, , d64)				\
325 CONVERT_INF (NUM##_dftd, df, td, , d128)			\
326 CONVERT_INF (NUM##_sddd, sd, dd, d32, d64)			\
327 CONVERT_INF (NUM##_sdtd, sd, td, d32, d128)			\
328 CONVERT_INF (NUM##_ddsd, dd, sd, d64, d32)			\
329 CONVERT_INF (NUM##_ddtd, dd, td, d64, d128)			\
330 CONVERT_INF (NUM##_tdsd, td, sd, d128, d32)			\
331 CONVERT_INF (NUM##_tddd, td, dd, d128, d64)
332 
333 #if USE_TF == 0
334 #define CONVERT_INF_TF(NUM)
335 #else
336 #define CONVERT_INF_TF(NUM)					\
337 CONVERT_INF (NUM##_sdtf, sd, tf, d32, l)			\
338 CONVERT_INF (NUM##_ddtf, dd, tf, d64, l)			\
339 CONVERT_INF (NUM##_tdtf, td, tf, d128, l)			\
340 CONVERT_INF (NUM##_tfsd, tf, sd, l, d32)			\
341 CONVERT_INF (NUM##_tfdd, tf, dd, l, d64)			\
342 CONVERT_INF (NUM##_tftd, tf, td, l, d128)
343 #endif
344 
345 #define CONVERT_INF_ALL(NUM)					\
346   CONVERT_INF_NOTF(NUM)						\
347   CONVERT_INF_TF(NUM)
348 
349 #define CALL_INF(NUM)						\
350   convert_##NUM##_pinf ();					\
351   convert_##NUM##_minf ();
352 
353 #define CALL_INF_NOTF(NUM)					\
354   CALL_INF (NUM##_sdsf)						\
355   CALL_INF (NUM##_sddf)						\
356   CALL_INF (NUM##_ddsf)						\
357   CALL_INF (NUM##_dddf)						\
358   CALL_INF (NUM##_tdsf)						\
359   CALL_INF (NUM##_tddf)						\
360   CALL_INF (NUM##_sfsd)						\
361   CALL_INF (NUM##_sfdd)						\
362   CALL_INF (NUM##_sftd)						\
363   CALL_INF (NUM##_dfsd)						\
364   CALL_INF (NUM##_dfdd)						\
365   CALL_INF (NUM##_dftd)						\
366   CALL_INF (NUM##_sddd)						\
367   CALL_INF (NUM##_sdtd)						\
368   CALL_INF (NUM##_ddsd)						\
369   CALL_INF (NUM##_ddtd)						\
370   CALL_INF (NUM##_tdsd)						\
371   CALL_INF (NUM##_tddd)
372 
373 #if USE_TF == 0
374 #define CALL_INF_TF(NUM)
375 #else
376 #define CALL_INF_TF(NUM)					\
377   CALL_INF (NUM##_sdtf)						\
378   CALL_INF (NUM##_ddtf)						\
379   CALL_INF (NUM##_tdtf)						\
380   CALL_INF (NUM##_tfsd)						\
381   CALL_INF (NUM##_tfdd)						\
382   CALL_INF (NUM##_tftd)
383 #endif
384 
385 #define CALL_INF_ALL(NUM)					\
386   CALL_INF_NOTF(NUM)						\
387   CALL_INF_TF(NUM)
388 
389 #define CONVERT_NAN_NOTF(NUM)					\
390 CONVERT_NAN (NUM##_sdsf, sd, sf, d32, f)			\
391 CONVERT_NAN (NUM##_sddf, sd, df, d32, )				\
392 CONVERT_NAN (NUM##_ddsf, dd, sf, d64, f)			\
393 CONVERT_NAN (NUM##_dddf, dd, df, d64, )				\
394 CONVERT_NAN (NUM##_tdsf, td, sf, d128, f)			\
395 CONVERT_NAN (NUM##_tddf, td, df, d128, )			\
396 CONVERT_NAN (NUM##_sfsd, sf, sd, f, d32)			\
397 CONVERT_NAN (NUM##_sfdd, sf, dd, f, d64)			\
398 CONVERT_NAN (NUM##_sftd, sf, td, f, d128)			\
399 CONVERT_NAN (NUM##_dfsd, df, sd, , d32)				\
400 CONVERT_NAN (NUM##_dfdd, df, dd, , d64)				\
401 CONVERT_NAN (NUM##_dftd, df, td, , d128)			\
402 CONVERT_NAN (NUM##_sddd, sd, dd, d32, d64)			\
403 CONVERT_NAN (NUM##_sdtd, sd, td, d32, d128)			\
404 CONVERT_NAN (NUM##_ddsd, dd, sd, d64, d32)			\
405 CONVERT_NAN (NUM##_ddtd, dd, td, d64, d128)			\
406 CONVERT_NAN (NUM##_tdsd, td, sd, d128, d32)			\
407 CONVERT_NAN (NUM##_tddd, td, dd, d128, d64)
408 
409 #if USE_TF == 0
410 #define CONVERT_NAN_TF(NUM)
411 #else
412 #define CONVERT_NAN_TF(NUM)					\
413 CONVERT_NAN (NUM##_sdtf, sd, tf, d32, l)			\
414 CONVERT_NAN (NUM##_ddtf, dd, tf, d64, l)			\
415 CONVERT_NAN (NUM##_tdtf, td, tf, d128, l)			\
416 CONVERT_NAN (NUM##_tfsd, tf, sd, l, d32)			\
417 CONVERT_NAN (NUM##_tfdd, tf, dd, l, d64)			\
418 CONVERT_NAN (NUM##_tftd, tf, td, l, d128)
419 #endif
420 
421 #define CONVERT_NAN_ALL(NUM)					\
422   CONVERT_NAN_NOTF(NUM)						\
423   CONVERT_NAN_TF(NUM)
424 
425 #define CALL_NAN(NUM)						\
426   convert_##NUM##_nan ();
427 
428 #define CALL_NAN_NOTF(NUM)					\
429   CALL_NAN (NUM##_sdsf)						\
430   CALL_NAN (NUM##_sddf)						\
431   CALL_NAN (NUM##_ddsf)						\
432   CALL_NAN (NUM##_dddf)						\
433   CALL_NAN (NUM##_tdsf)						\
434   CALL_NAN (NUM##_tddf)						\
435   CALL_NAN (NUM##_sfsd)						\
436   CALL_NAN (NUM##_sfdd)						\
437   CALL_NAN (NUM##_sftd)						\
438   CALL_NAN (NUM##_dfsd)						\
439   CALL_NAN (NUM##_dfdd)						\
440   CALL_NAN (NUM##_dftd)						\
441   CALL_NAN (NUM##_sddd)						\
442   CALL_NAN (NUM##_sdtd)						\
443   CALL_NAN (NUM##_ddsd)						\
444   CALL_NAN (NUM##_ddtd)						\
445   CALL_NAN (NUM##_tdsd)						\
446   CALL_NAN (NUM##_tddd)
447 
448 #if USE_TF == 0
449 #define CALL_NAN_TF(NUM)
450 #else
451 #define CALL_NAN_TF(NUM)					\
452   CALL_NAN (NUM##_sdtf)						\
453   CALL_NAN (NUM##_ddtf)						\
454   CALL_NAN (NUM##_tdtf)						\
455   CALL_NAN (NUM##_tfsd)						\
456   CALL_NAN (NUM##_tfdd)						\
457   CALL_NAN (NUM##_tftd)
458 #endif
459 
460 #define CALL_NAN_ALL(NUM)					\
461   CALL_NAN_NOTF(NUM)						\
462   CALL_NAN_TF(NUM)
463