Remove support in configure for unsupported architectures
[glibc.git] / sysdeps / ia64 / fpu / printf_fphex.c
blob5def1905d822258db8d837786e2c3e9ded17c551
1 /* Print floating point number in hexadecimal notation according to ISO C99.
2 Copyright (C) 2000, 2005 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
20 #ifndef LONG_DOUBLE_DENORM_BIAS
21 # define LONG_DOUBLE_DENORM_BIAS (IEEE854_LONG_DOUBLE_BIAS - 1)
22 #endif
24 #define PRINT_FPHEX_LONG_DOUBLE \
25 do { \
26 /* The "strange" 80 bit format on ia64 has an explicit \
27 leading digit in the 64 bit mantissa. */ \
28 unsigned long long int num; \
30 num = (((unsigned long long int) fpnum.ldbl.ieee.mantissa0) << 32 \
31 | fpnum.ldbl.ieee.mantissa1); \
33 zero_mantissa = num == 0; \
35 numstr = _itoa_word (num, numbuf + sizeof numbuf, 16, \
36 info->spec == 'A'); \
37 wnumstr = _itowa_word (num, \
38 wnumbuf + sizeof (wnumbuf) / sizeof (wchar_t), \
39 16, info->spec == 'A'); \
41 /* Fill with zeroes. */ \
42 while (numstr > numbuf + (sizeof numbuf - 64 / 4)) \
43 { \
44 *--numstr = '0'; \
45 *--wnumstr = L'0'; \
46 } \
48 /* We use a full nibble for the leading digit. */ \
49 leading = *numstr++; \
51 /* We have 3 bits from the mantissa in the leading nibble. \
52 Therefore we are here using `IEEE854_LONG_DOUBLE_BIAS + 3'. */ \
53 exponent = fpnum.ldbl.ieee.exponent; \
55 if (exponent == 0) \
56 { \
57 if (zero_mantissa) \
58 expnegative = 0; \
59 else \
60 { \
61 /* This is a denormalized number. */ \
62 expnegative = 1; \
63 /* This is a hook for the m68k long double format, where the \
64 exponent bias is the same for normalized and denormalized \
65 numbers. */ \
66 exponent = LONG_DOUBLE_DENORM_BIAS + 3; \
67 } \
68 } \
69 else if (exponent >= IEEE854_LONG_DOUBLE_BIAS + 3) \
70 { \
71 expnegative = 0; \
72 exponent -= IEEE854_LONG_DOUBLE_BIAS + 3; \
73 } \
74 else \
75 { \
76 expnegative = 1; \
77 exponent = -(exponent - (IEEE854_LONG_DOUBLE_BIAS + 3)); \
78 } \
79 } while (0)
81 #include <stdio-common/printf_fphex.c>