diff options
author | obrien <obrien@FreeBSD.org> | 1999-10-16 06:09:09 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-10-16 06:09:09 +0000 |
commit | cae8fa8120c70195f34a2456f18c4c848a2d3e0c (patch) | |
tree | f7d3a3ab9c32694206552e767626366f016f2062 /contrib/gcc/real.h | |
parent | 84656b55b6e25e30322dc903a05de53706361d3d (diff) | |
download | FreeBSD-src-cae8fa8120c70195f34a2456f18c4c848a2d3e0c.zip FreeBSD-src-cae8fa8120c70195f34a2456f18c4c848a2d3e0c.tar.gz |
Virgin import of the GCC 2.95.1 compilers
Diffstat (limited to 'contrib/gcc/real.h')
-rw-r--r-- | contrib/gcc/real.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/contrib/gcc/real.h b/contrib/gcc/real.h index 0719c26..f289379 100644 --- a/contrib/gcc/real.h +++ b/contrib/gcc/real.h @@ -1,5 +1,5 @@ /* Definitions of floating-point access for GNU compiler. - Copyright (C) 1989, 1991, 1994, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1989, 91, 94, 96-98, 1999 Free Software Foundation, Inc. This file is part of GNU CC. @@ -132,7 +132,7 @@ extern void earith PROTO((REAL_VALUE_TYPE *, int, REAL_VALUE_TYPE *, REAL_VALUE_TYPE *)); extern REAL_VALUE_TYPE etrunci PROTO((REAL_VALUE_TYPE)); extern REAL_VALUE_TYPE etruncui PROTO((REAL_VALUE_TYPE)); -extern REAL_VALUE_TYPE ereal_atof PROTO((char *, enum machine_mode)); +extern REAL_VALUE_TYPE ereal_atof PROTO((const char *, enum machine_mode)); extern REAL_VALUE_TYPE ereal_negate PROTO((REAL_VALUE_TYPE)); extern HOST_WIDE_INT efixi PROTO((REAL_VALUE_TYPE)); extern unsigned HOST_WIDE_INT efixui PROTO((REAL_VALUE_TYPE)); @@ -178,7 +178,11 @@ extern REAL_VALUE_TYPE real_value_truncate PROTO ((enum machine_mode, toward zero. */ #define REAL_VALUE_UNSIGNED_FIX(x) (efixui (x)) +/* Convert ASCII string S to floating point in mode M. + Decimal input uses ATOF. Hexadecimal uses HTOF. */ #define REAL_VALUE_ATOF ereal_atof +#define REAL_VALUE_HTOF ereal_atof + #define REAL_VALUE_NEGATE ereal_negate #define REAL_VALUE_MINUS_ZERO(x) \ @@ -355,6 +359,9 @@ extern double ldexp (); /* Use real.c to convert decimal numbers to binary, ... */ REAL_VALUE_TYPE ereal_atof (); #define REAL_VALUE_ATOF(x, s) ereal_atof (x, s) +/* Could use ereal_atof here for hexadecimal floats too, but real_hex_to_f + is OK and it uses faster native fp arithmetic. */ +/* #define REAL_VALUE_HTOF(x, s) ereal_atof (x, s) */ #else /* ... or, if you like the host computer's atof, go ahead and use it: */ #define REAL_VALUE_ATOF(x, s) atof (x) @@ -369,6 +376,13 @@ extern double (atof) (); #endif #endif +/* Hexadecimal floating constant input for use with host computer's + fp arithmetic. */ +#ifndef REAL_VALUE_HTOF +extern REAL_VALUE_TYPE real_hex_to_f PROTO((char *, enum machine_mode)); +#define REAL_VALUE_HTOF(s,m) real_hex_to_f(s,m) +#endif + /* Negate the floating-point value X. */ #ifndef REAL_VALUE_NEGATE #define REAL_VALUE_NEGATE(x) (- (x)) |