OSDN Git Service

* Rework fields used to describe positions of bitfields and
[pf3gnuchains/gcc-fork.git] / gcc / real.h
1 /* Definitions of floating-point access for GNU compiler.
2    Copyright (C) 1989, 1991, 1994, 1996, 1997, 1998,
3    1999, 2000 Free Software Foundation, Inc.
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 #ifndef REAL_H_INCLUDED
23 #define REAL_H_INCLUDED
24
25 /* Define codes for all the float formats that we know of.  */
26 #define UNKNOWN_FLOAT_FORMAT 0
27 #define IEEE_FLOAT_FORMAT 1
28 #define VAX_FLOAT_FORMAT 2
29 #define IBM_FLOAT_FORMAT 3
30 #define C4X_FLOAT_FORMAT 4
31
32 /* Default to IEEE float if not specified.  Nearly all machines use it.  */
33
34 #ifndef TARGET_FLOAT_FORMAT
35 #define TARGET_FLOAT_FORMAT     IEEE_FLOAT_FORMAT
36 #endif
37
38 #ifndef HOST_FLOAT_FORMAT
39 #define HOST_FLOAT_FORMAT       IEEE_FLOAT_FORMAT
40 #endif
41
42 #if TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT
43 #define REAL_INFINITY
44 #endif
45
46 /* If FLOAT_WORDS_BIG_ENDIAN and HOST_FLOAT_WORDS_BIG_ENDIAN are not defined
47    in the header files, then this implies the word-endianness is the same as
48    for integers.  */
49
50 /* This is defined 0 or 1, like WORDS_BIG_ENDIAN.  */
51 #ifndef FLOAT_WORDS_BIG_ENDIAN
52 #define FLOAT_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
53 #endif
54
55 /* This is defined 0 or 1, unlike HOST_WORDS_BIG_ENDIAN.  */
56 #ifndef HOST_FLOAT_WORDS_BIG_ENDIAN
57 #ifdef HOST_WORDS_BIG_ENDIAN
58 #define HOST_FLOAT_WORDS_BIG_ENDIAN 1
59 #else
60 #define HOST_FLOAT_WORDS_BIG_ENDIAN 0
61 #endif
62 #endif
63
64 /* Defining REAL_ARITHMETIC invokes a floating point emulator
65    that can produce a target machine format differing by more
66    than just endian-ness from the host's format.  The emulator
67    is also used to support extended real XFmode.  */
68 #ifndef LONG_DOUBLE_TYPE_SIZE
69 #define LONG_DOUBLE_TYPE_SIZE 64
70 #endif
71 #ifndef MAX_LONG_DOUBLE_TYPE_SIZE
72 #define MAX_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
73 #endif
74 #if (MAX_LONG_DOUBLE_TYPE_SIZE == 96) || (MAX_LONG_DOUBLE_TYPE_SIZE == 128)
75 #ifndef REAL_ARITHMETIC
76 #define REAL_ARITHMETIC
77 #endif
78 #endif
79 #ifdef REAL_ARITHMETIC
80 /* **** Start of software floating point emulator interface macros **** */
81
82 /* Support 80-bit extended real XFmode if LONG_DOUBLE_TYPE_SIZE
83    has been defined to be 96 in the tm.h machine file. */
84 #if (MAX_LONG_DOUBLE_TYPE_SIZE == 96)
85 #define REAL_IS_NOT_DOUBLE
86 #define REAL_ARITHMETIC
87 typedef struct {
88   HOST_WIDE_INT r[(11 + sizeof (HOST_WIDE_INT))/(sizeof (HOST_WIDE_INT))];
89 } realvaluetype;
90 #define REAL_VALUE_TYPE realvaluetype
91
92 #else /* no XFmode support */
93
94 #if (MAX_LONG_DOUBLE_TYPE_SIZE == 128)
95
96 #define REAL_IS_NOT_DOUBLE
97 #define REAL_ARITHMETIC
98 typedef struct {
99   HOST_WIDE_INT r[(19 + sizeof (HOST_WIDE_INT))/(sizeof (HOST_WIDE_INT))];
100 } realvaluetype;
101 #define REAL_VALUE_TYPE realvaluetype
102
103 #else /* not TFmode */
104
105 #if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
106 /* If no XFmode support, then a REAL_VALUE_TYPE is 64 bits wide
107    but it is not necessarily a host machine double. */
108 #define REAL_IS_NOT_DOUBLE
109 typedef struct {
110   HOST_WIDE_INT r[(7 + sizeof (HOST_WIDE_INT))/(sizeof (HOST_WIDE_INT))];
111 } realvaluetype;
112 #define REAL_VALUE_TYPE realvaluetype
113 #else
114 /* If host and target formats are compatible, then a REAL_VALUE_TYPE
115    is actually a host machine double. */
116 #define REAL_VALUE_TYPE double
117 #endif
118
119 #endif /* no TFmode support */
120 #endif /* no XFmode support */
121
122 extern unsigned int significand_size    PARAMS ((enum machine_mode));
123
124 /* If emulation has been enabled by defining REAL_ARITHMETIC or by
125    setting LONG_DOUBLE_TYPE_SIZE to 96 or 128, then define macros so that
126    they invoke emulator functions. This will succeed only if the machine
127    files have been updated to use these macros in place of any
128    references to host machine `double' or `float' types.  */
129 #ifdef REAL_ARITHMETIC
130 #undef REAL_ARITHMETIC
131 #define REAL_ARITHMETIC(value, code, d1, d2) \
132   earith (&(value), (code), &(d1), &(d2))
133
134 /* Declare functions in real.c. */
135 extern void earith              PARAMS ((REAL_VALUE_TYPE *, int,
136                                        REAL_VALUE_TYPE *, REAL_VALUE_TYPE *));
137 extern REAL_VALUE_TYPE etrunci  PARAMS ((REAL_VALUE_TYPE));
138 extern REAL_VALUE_TYPE etruncui PARAMS ((REAL_VALUE_TYPE));
139 extern REAL_VALUE_TYPE ereal_atof PARAMS ((const char *, enum machine_mode));
140 extern REAL_VALUE_TYPE ereal_negate PARAMS ((REAL_VALUE_TYPE));
141 extern HOST_WIDE_INT efixi      PARAMS ((REAL_VALUE_TYPE));
142 extern unsigned HOST_WIDE_INT efixui PARAMS ((REAL_VALUE_TYPE));
143 extern void ereal_from_int      PARAMS ((REAL_VALUE_TYPE *,
144                                        HOST_WIDE_INT, HOST_WIDE_INT,
145                                        enum machine_mode));
146 extern void ereal_from_uint     PARAMS ((REAL_VALUE_TYPE *,
147                                        unsigned HOST_WIDE_INT,
148                                        unsigned HOST_WIDE_INT,
149                                        enum machine_mode));
150 extern void ereal_to_int        PARAMS ((HOST_WIDE_INT *, HOST_WIDE_INT *,
151                                        REAL_VALUE_TYPE));
152 extern REAL_VALUE_TYPE ereal_ldexp PARAMS ((REAL_VALUE_TYPE, int));
153
154 extern void etartdouble         PARAMS ((REAL_VALUE_TYPE, long *));
155 extern void etarldouble         PARAMS ((REAL_VALUE_TYPE, long *));
156 extern void etardouble          PARAMS ((REAL_VALUE_TYPE, long *));
157 extern long etarsingle          PARAMS ((REAL_VALUE_TYPE));
158 extern void ereal_to_decimal    PARAMS ((REAL_VALUE_TYPE, char *));
159 extern int ereal_cmp            PARAMS ((REAL_VALUE_TYPE, REAL_VALUE_TYPE));
160 extern int ereal_isneg          PARAMS ((REAL_VALUE_TYPE));
161 extern REAL_VALUE_TYPE ereal_unto_float PARAMS ((long));
162 extern REAL_VALUE_TYPE ereal_unto_double PARAMS ((long *));
163 extern REAL_VALUE_TYPE ereal_from_float PARAMS ((HOST_WIDE_INT));
164 extern REAL_VALUE_TYPE ereal_from_double PARAMS ((HOST_WIDE_INT *));
165
166 #define REAL_VALUES_EQUAL(x, y) (ereal_cmp ((x), (y)) == 0)
167 /* true if x < y : */
168 #define REAL_VALUES_LESS(x, y) (ereal_cmp ((x), (y)) == -1)
169 #define REAL_VALUE_LDEXP(x, n) ereal_ldexp (x, n)
170
171 /* These return REAL_VALUE_TYPE: */
172 #define REAL_VALUE_RNDZINT(x) (etrunci (x))
173 #define REAL_VALUE_UNSIGNED_RNDZINT(x) (etruncui (x))
174 extern REAL_VALUE_TYPE real_value_truncate      PARAMS ((enum machine_mode,
175                                                         REAL_VALUE_TYPE));
176 #define REAL_VALUE_TRUNCATE(mode, x)  real_value_truncate (mode, x)
177
178 /* These return HOST_WIDE_INT: */
179 /* Convert a floating-point value to integer, rounding toward zero.  */
180 #define REAL_VALUE_FIX(x) (efixi (x))
181 /* Convert a floating-point value to unsigned integer, rounding
182    toward zero. */
183 #define REAL_VALUE_UNSIGNED_FIX(x) (efixui (x))
184
185 /* Convert ASCII string S to floating point in mode M.
186    Decimal input uses ATOF.  Hexadecimal uses HTOF.  */
187 #define REAL_VALUE_ATOF(s,m) ereal_atof(s,m)
188 #define REAL_VALUE_HTOF(s,m) ereal_atof(s,m)
189
190 #define REAL_VALUE_NEGATE ereal_negate
191
192 #define REAL_VALUE_MINUS_ZERO(x) \
193  ((ereal_cmp (x, dconst0) == 0) && (ereal_isneg (x) != 0 ))
194
195 #define REAL_VALUE_TO_INT ereal_to_int
196
197 /* Here the cast to HOST_WIDE_INT sign-extends arguments such as ~0.  */
198 #define REAL_VALUE_FROM_INT(d, lo, hi, mode) \
199   ereal_from_int (&d, (HOST_WIDE_INT) (lo), (HOST_WIDE_INT) (hi), mode)
200
201 #define REAL_VALUE_FROM_UNSIGNED_INT(d, lo, hi, mode) \
202   ereal_from_uint (&d, lo, hi, mode)
203
204 /* IN is a REAL_VALUE_TYPE.  OUT is an array of longs. */
205 #if MAX_LONG_DOUBLE_TYPE_SIZE == 96
206 #define REAL_VALUE_TO_TARGET_LONG_DOUBLE(IN, OUT) (etarldouble ((IN), (OUT)))
207 #else
208 #define REAL_VALUE_TO_TARGET_LONG_DOUBLE(IN, OUT) (etartdouble ((IN), (OUT)))
209 #endif
210 #define REAL_VALUE_TO_TARGET_DOUBLE(IN, OUT) (etardouble ((IN), (OUT)))
211
212 /* IN is a REAL_VALUE_TYPE.  OUT is a long. */
213 #define REAL_VALUE_TO_TARGET_SINGLE(IN, OUT) ((OUT) = etarsingle ((IN)))
214
215 /* Inverse of REAL_VALUE_TO_TARGET_DOUBLE. */
216 #define REAL_VALUE_UNTO_TARGET_DOUBLE(d)  (ereal_unto_double (d))
217
218 /* Inverse of REAL_VALUE_TO_TARGET_SINGLE. */
219 #define REAL_VALUE_UNTO_TARGET_SINGLE(f)  (ereal_unto_float (f))
220
221 /* d is an array of HOST_WIDE_INT that holds a double precision
222    value in the target computer's floating point format. */
223 #define REAL_VALUE_FROM_TARGET_DOUBLE(d)  (ereal_from_double (d))
224
225 /* f is a HOST_WIDE_INT containing a single precision target float value. */
226 #define REAL_VALUE_FROM_TARGET_SINGLE(f)  (ereal_from_float (f))
227
228 /* Conversions to decimal ASCII string.  */
229 #define REAL_VALUE_TO_DECIMAL(r, fmt, s) (ereal_to_decimal (r, s))
230
231 #endif /* REAL_ARITHMETIC defined */
232
233 /* **** End of software floating point emulator interface macros **** */
234 #else /* No XFmode or TFmode and REAL_ARITHMETIC not defined */
235
236 /* old interface */
237 #ifdef REAL_ARITHMETIC
238 /* Defining REAL_IS_NOT_DOUBLE breaks certain initializations
239    when REAL_ARITHMETIC etc. are not defined.  */
240
241 /* Now see if the host and target machines use the same format. 
242    If not, define REAL_IS_NOT_DOUBLE (even if we end up representing
243    reals as doubles because we have no better way in this cross compiler.)
244    This turns off various optimizations that can happen when we know the
245    compiler's float format matches the target's float format.
246    */
247 #if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
248 #define REAL_IS_NOT_DOUBLE
249 #ifndef REAL_VALUE_TYPE
250 typedef struct {
251     HOST_WIDE_INT r[sizeof (double)/sizeof (HOST_WIDE_INT)];
252   } realvaluetype;
253 #define REAL_VALUE_TYPE realvaluetype
254 #endif /* no REAL_VALUE_TYPE */
255 #endif /* formats differ */
256 #endif /* 0 */
257
258 #endif /* emulator not used */
259
260 /* If we are not cross-compiling, use a `double' to represent the
261    floating-point value.  Otherwise, use some other type
262    (probably a struct containing an array of longs).  */
263 #ifndef REAL_VALUE_TYPE
264 #define REAL_VALUE_TYPE double
265 #else
266 #define REAL_IS_NOT_DOUBLE
267 #endif
268
269 #if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
270
271 /* Convert a type `double' value in host format first to a type `float'
272    value in host format and then to a single type `long' value which
273    is the bitwise equivalent of the `float' value.  */
274 #ifndef REAL_VALUE_TO_TARGET_SINGLE
275 #define REAL_VALUE_TO_TARGET_SINGLE(IN, OUT)            \
276 do {                                                    \
277   union {                                               \
278     float f;                                            \
279     HOST_WIDE_INT l;                                    \
280   } u;                                                  \
281   if (sizeof(HOST_WIDE_INT) < sizeof(float))            \
282     abort();                                            \
283   u.l = 0;                                              \
284   u.f = (IN);                                           \
285   (OUT) = u.l;                                          \
286 } while (0)
287 #endif
288
289 /* Convert a type `double' value in host format to a pair of type `long'
290    values which is its bitwise equivalent, but put the two words into
291    proper word order for the target.  */
292 #ifndef REAL_VALUE_TO_TARGET_DOUBLE
293 #define REAL_VALUE_TO_TARGET_DOUBLE(IN, OUT)                            \
294 do {                                                                    \
295   union {                                                               \
296     REAL_VALUE_TYPE f;                                                  \
297     HOST_WIDE_INT l[2];                                                 \
298   } u;                                                                  \
299   if (sizeof(HOST_WIDE_INT) * 2 < sizeof(REAL_VALUE_TYPE))              \
300     abort();                                                            \
301   u.l[0] = u.l[1] = 0;                                                  \
302   u.f = (IN);                                                           \
303   if (HOST_FLOAT_WORDS_BIG_ENDIAN == FLOAT_WORDS_BIG_ENDIAN)            \
304     (OUT)[0] = u.l[0], (OUT)[1] = u.l[1];                               \
305   else                                                                  \
306     (OUT)[1] = u.l[0], (OUT)[0] = u.l[1];                               \
307 } while (0)
308 #endif
309 #endif /* HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT */
310
311 /* In this configuration, double and long double are the same. */
312 #ifndef REAL_VALUE_TO_TARGET_LONG_DOUBLE
313 #define REAL_VALUE_TO_TARGET_LONG_DOUBLE(a, b) REAL_VALUE_TO_TARGET_DOUBLE (a, b)
314 #endif
315
316 /* Compare two floating-point objects for bitwise identity.
317    This is not the same as comparing for equality on IEEE hosts:
318    -0.0 equals 0.0 but they are not identical, and conversely
319    two NaNs might be identical but they cannot be equal.  */
320 #define REAL_VALUES_IDENTICAL(x, y) \
321   (!bcmp ((char *) &(x), (char *) &(y), sizeof (REAL_VALUE_TYPE)))
322
323 /* Compare two floating-point values for equality.  */
324 #ifndef REAL_VALUES_EQUAL
325 #define REAL_VALUES_EQUAL(x, y) ((x) == (y))
326 #endif
327
328 /* Compare two floating-point values for less than.  */
329 #ifndef REAL_VALUES_LESS
330 #define REAL_VALUES_LESS(x, y) ((x) < (y))
331 #endif
332
333 /* Truncate toward zero to an integer floating-point value.  */
334 #ifndef REAL_VALUE_RNDZINT
335 #define REAL_VALUE_RNDZINT(x) ((double) ((int) (x)))
336 #endif
337
338 /* Truncate toward zero to an unsigned integer floating-point value.  */
339 #ifndef REAL_VALUE_UNSIGNED_RNDZINT
340 #define REAL_VALUE_UNSIGNED_RNDZINT(x) ((double) ((unsigned int) (x)))
341 #endif
342
343 /* Convert a floating-point value to integer, rounding toward zero.  */
344 #ifndef REAL_VALUE_FIX
345 #define REAL_VALUE_FIX(x) ((int) (x))
346 #endif
347
348 /* Convert a floating-point value to unsigned integer, rounding
349    toward zero. */
350 #ifndef REAL_VALUE_UNSIGNED_FIX
351 #define REAL_VALUE_UNSIGNED_FIX(x) ((unsigned int) (x))
352 #endif
353
354 /* Scale X by Y powers of 2.  */
355 #ifndef REAL_VALUE_LDEXP
356 #define REAL_VALUE_LDEXP(x, y) ldexp (x, y)
357 extern double ldexp ();
358 #endif
359
360 /* Convert the string X to a floating-point value.  */
361 #ifndef REAL_VALUE_ATOF
362 #if 1
363 /* Use real.c to convert decimal numbers to binary, ... */
364 extern REAL_VALUE_TYPE ereal_atof PARAMS ((const char *, enum machine_mode));
365 #define REAL_VALUE_ATOF(x, s) ereal_atof (x, s)
366 /* Could use ereal_atof here for hexadecimal floats too, but real_hex_to_f
367    is OK and it uses faster native fp arithmetic.  */
368 /* #define REAL_VALUE_HTOF(x, s) ereal_atof (x, s) */
369 #else
370 /* ... or, if you like the host computer's atof, go ahead and use it: */
371 #define REAL_VALUE_ATOF(x, s) atof (x)
372 #if defined (MIPSEL) || defined (MIPSEB)
373 /* MIPS compiler can't handle parens around the function name.
374    This problem *does not* appear to be connected with any
375    macro definition for atof.  It does not seem there is one.  */
376 extern double atof ();
377 #else
378 extern double (atof) ();
379 #endif
380 #endif
381 #endif
382
383 /* Hexadecimal floating constant input for use with host computer's
384    fp arithmetic.  */
385 #ifndef REAL_VALUE_HTOF
386 extern REAL_VALUE_TYPE real_hex_to_f PARAMS ((char *, enum machine_mode));
387 #define REAL_VALUE_HTOF(s,m) real_hex_to_f(s,m)
388 #endif
389
390 /* Negate the floating-point value X.  */
391 #ifndef REAL_VALUE_NEGATE
392 #define REAL_VALUE_NEGATE(x) (- (x))
393 #endif
394
395 /* Truncate the floating-point value X to mode MODE.  This is correct only
396    for the most common case where the host and target have objects of the same
397    size and where `float' is SFmode.  */
398
399 /* Don't use REAL_VALUE_TRUNCATE directly--always call real_value_truncate.  */
400 extern REAL_VALUE_TYPE real_value_truncate PARAMS ((enum machine_mode,
401                                                   REAL_VALUE_TYPE));
402
403 #ifndef REAL_VALUE_TRUNCATE
404 #define REAL_VALUE_TRUNCATE(mode, x) \
405  (GET_MODE_BITSIZE (mode) == sizeof (float) * HOST_BITS_PER_CHAR        \
406   ? (float) (x) : (x))
407 #endif
408
409 /* Determine whether a floating-point value X is infinite. */
410 #ifndef REAL_VALUE_ISINF
411 #define REAL_VALUE_ISINF(x) (target_isinf (x))
412 #endif
413
414 /* Determine whether a floating-point value X is a NaN. */
415 #ifndef REAL_VALUE_ISNAN
416 #define REAL_VALUE_ISNAN(x) (target_isnan (x))
417 #endif
418
419 /* Determine whether a floating-point value X is negative. */
420 #ifndef REAL_VALUE_NEGATIVE
421 #define REAL_VALUE_NEGATIVE(x) (target_negative (x))
422 #endif
423
424 extern int target_isnan                 PARAMS ((REAL_VALUE_TYPE));
425 extern int target_isinf                 PARAMS ((REAL_VALUE_TYPE));
426 extern int target_negative              PARAMS ((REAL_VALUE_TYPE));
427
428 /* Determine whether a floating-point value X is minus 0. */
429 #ifndef REAL_VALUE_MINUS_ZERO
430 #define REAL_VALUE_MINUS_ZERO(x) ((x) == 0 && REAL_VALUE_NEGATIVE (x))
431 #endif
432 \f
433 /* Constant real values 0, 1, 2, and -1.  */
434
435 extern REAL_VALUE_TYPE dconst0;
436 extern REAL_VALUE_TYPE dconst1;
437 extern REAL_VALUE_TYPE dconst2;
438 extern REAL_VALUE_TYPE dconstm1;
439
440 /* Union type used for extracting real values from CONST_DOUBLEs
441    or putting them in.  */
442
443 union real_extract 
444 {
445   REAL_VALUE_TYPE d;
446   HOST_WIDE_INT i[sizeof (REAL_VALUE_TYPE) / sizeof (HOST_WIDE_INT)];
447 };
448
449 /* For a CONST_DOUBLE:
450    The usual two ints that hold the value.
451    For a DImode, that is all there are;
452     and CONST_DOUBLE_LOW is the low-order word and ..._HIGH the high-order.
453    For a float, the number of ints varies,
454     and CONST_DOUBLE_LOW is the one that should come first *in memory*.
455     So use &CONST_DOUBLE_LOW(r) as the address of an array of ints.  */
456 #define CONST_DOUBLE_LOW(r) XWINT (r, 2)
457 #define CONST_DOUBLE_HIGH(r) XWINT (r, 3)
458
459 /* Link for chain of all CONST_DOUBLEs in use in current function.  */
460 #define CONST_DOUBLE_CHAIN(r) X0EXP (r, 1)
461 /* The MEM which represents this CONST_DOUBLE's value in memory,
462    or const0_rtx if no MEM has been made for it yet,
463    or cc0_rtx if it is not on the chain.  */
464 #define CONST_DOUBLE_MEM(r) XEXP (r, 0)
465
466 /* Given a CONST_DOUBLE in FROM, store into TO the value it represents.  */
467 /* Function to return a real value (not a tree node)
468    from a given integer constant.  */
469 union tree_node;
470 REAL_VALUE_TYPE real_value_from_int_cst PARAMS ((union tree_node *,
471                                                 union tree_node *));
472
473 #define REAL_VALUE_FROM_CONST_DOUBLE(to, from)          \
474 do { union real_extract u;                              \
475      bcopy ((char *) &CONST_DOUBLE_LOW ((from)), (char *) &u, sizeof u); \
476      to = u.d; } while (0)
477
478 /* Return a CONST_DOUBLE with value R and mode M.  */
479
480 #define CONST_DOUBLE_FROM_REAL_VALUE(r, m) immed_real_const_1 (r,  m)
481 extern struct rtx_def *immed_real_const_1       PARAMS ((REAL_VALUE_TYPE,
482                                                        enum machine_mode));
483
484
485 /* Convert a floating point value `r', that can be interpreted
486    as a host machine float or double, to a decimal ASCII string `s'
487    using printf format string `fmt'.  */
488 #ifndef REAL_VALUE_TO_DECIMAL
489 #define REAL_VALUE_TO_DECIMAL(r, fmt, s) (sprintf (s, fmt, r))
490 #endif
491
492 /* Replace R by 1/R in the given machine mode, if the result is exact.  */
493 extern int exact_real_inverse   PARAMS ((enum machine_mode, REAL_VALUE_TYPE *));
494 extern int target_isnan         PARAMS ((REAL_VALUE_TYPE));
495 extern int target_isinf         PARAMS ((REAL_VALUE_TYPE));
496 extern int target_negative      PARAMS ((REAL_VALUE_TYPE));
497 extern void debug_real          PARAMS ((REAL_VALUE_TYPE));
498
499 /* In varasm.c */
500 extern void assemble_real               PARAMS ((REAL_VALUE_TYPE,
501                                                enum machine_mode));
502 extern void debug_real                  PARAMS ((REAL_VALUE_TYPE));
503
504 /* In varasm.c */
505 extern void assemble_real               PARAMS ((REAL_VALUE_TYPE,
506                                                enum machine_mode));
507 #endif /* Not REAL_H_INCLUDED */