aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2002-03-11 11:13:45 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2002-03-11 11:13:45 +0000
commit3fcaac1d8c04d2966e667e1e4b18959bb94656c9 (patch)
treeb35783a3200c2c8aa44adc916c24401dfe49041e /gcc/doc
parentd25558bee8343ee30661c00aa2faefd89d60068c (diff)
downloadgcc-3fcaac1d8c04d2966e667e1e4b18959bb94656c9.zip
gcc-3fcaac1d8c04d2966e667e1e4b18959bb94656c9.tar.gz
gcc-3fcaac1d8c04d2966e667e1e4b18959bb94656c9.tar.bz2
defaults.h (LARGEST_EXPONENT_IS_NORMAL, [...]): New.
* defaults.h (LARGEST_EXPONENT_IS_NORMAL, ROUND_TOWARDS_ZERO): New. (MODE_HAS_NANS, MODE_HAS_INFINITIES): Evaluate to false if LARGEST_EXPONENT_IS_NORMAL for the given mode. (MODE_HAS_SIGN_DEPENDENT_ROUNDING): False when ROUND_TOWARDS_ZERO. * real.c (eadd1): Make rounding dependent on !ROUND_TOWARDS_ZERO. (ediv, emul, eldexp, esqrt): Likewise. (etoe113, etoe64, etoe53, etoe24, etodec, etoibm, etoc4x): Likewise. (e24toe): Only check NaNs & infinities if !LARGEST_EXPONENT_IS_NORMAL. (saturate): New function. (toe53, toe24): Saturate on overflow if LARGEST_EXPONENT_IS_NORMAL. (make_nan): Use a saturation value instead of a NaN if LARGEST_EXPONENT_IS_NORMAL. Warn when this happens. * fp-bit.c (pack_d): Saturate on NaN, infinite or overflowing inputs if LARGEST_EXPONENT_IS_NORMAL. Represent subnormals as zero if NO_DENORMALS. Only round to nearest if !ROUND_TOWARDS_ZERO. (unpack_d): No NaNs or infinities if LARGEST_EXPONENT_IS_NORMAL. (_fpmul_parts, _fpdiv_parts): Only round to nearest if !ROUND_TOWARDS_ZERO. * doc/tm.texi (LARGEST_EXPONENT_IS_NORMAL): Document. (ROUND_TOWARDS_ZERO): Document. From-SVN: r50569
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/tm.texi40
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 344c711..ad7917e 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -1385,6 +1385,46 @@ towards @minus{}infinity and towards +infinity.
The default definition of this macro is true if @var{mode} is
a floating-point mode and the target format is IEEE@.
+
+@findex ROUND_TOWARDS_ZERO
+@item ROUND_TOWARDS_ZERO
+If defined, this macro should be true if the prevailing rounding
+mode is towards zero. A true value has the following effects:
+
+@itemize @bullet
+@item
+@code{MODE_HAS_SIGN_DEPENDENT_ROUNDING} will be false for all modes.
+
+@item
+@file{libgcc.a}'s floating-point emulator will round towards zero
+rather than towards nearest.
+
+@item
+The compiler's floating-point emulator will round towards zero after
+doing arithmetic, and when converting from the internal float format to
+the target format.
+@end itemize
+
+The macro does not affect the parsing of string literals. When the
+primary rounding mode is towards zero, library functions like
+@code{strtod} might still round towards nearest, and the compiler's
+parser should behave like the target's @code{strtod} where possible.
+
+Not defining this macro is equivalent to returning zero.
+
+@findex LARGEST_EXPONENT_IS_NORMAL
+@item LARGEST_EXPONENT_IS_NORMAL (@var{size})
+This macro should only be defined when the target float format is
+described as IEEE@. It should return true if floats with @var{size}
+bits do not have a NaN or infinity representation, but use the largest
+exponent for normal numbers instead.
+
+Defining this macro to true for @var{size} causes @code{MODE_HAS_NANS}
+and @code{MODE_HAS_INFINITIES} to be false for @var{size}-bit modes.
+It also affects the way @file{libgcc.a} and @file{real.c} emulate
+floating-point arithmetic.
+
+The default definition of this macro returns false for all sizes.
@end table
@deftypefn {Target Hook} bool TARGET_MS_BITFIELD_LAYOUT_P (tree @var{record_type})