aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc/real.h
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>1999-10-16 06:09:09 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>1999-10-16 06:09:09 +0000
commitf2c57ef828fda14567ffdf5489def4e2408ac03d (patch)
treef7d3a3ab9c32694206552e767626366f016f2062 /contrib/gcc/real.h
parentaef9219924a74e512eff866a60b402251de6eceb (diff)
downloadsrc-f2c57ef828fda14567ffdf5489def4e2408ac03d.tar.gz
src-f2c57ef828fda14567ffdf5489def4e2408ac03d.zip
Virgin import of the GCC 2.95.1 compilers
Notes
Notes: svn path=/vendor/gcc/dist/; revision=52284
Diffstat (limited to 'contrib/gcc/real.h')
-rw-r--r--contrib/gcc/real.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/contrib/gcc/real.h b/contrib/gcc/real.h
index 0719c26654d1..f289379efd83 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))