summaryrefslogtreecommitdiff
path: root/gcc/real.h
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2005-02-03 06:44:35 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2005-02-03 06:44:35 +0000
commit762297d941e94600c6b81d5ccdd464872d9a9692 (patch)
treefb250b8935df7ba966a9aeae4f38b4eca4fc2969 /gcc/real.h
parent666158b9cecdc55cc2f2cf0c77f571220b5a10c3 (diff)
downloadgcc-762297d941e94600c6b81d5ccdd464872d9a9692.tar.gz
re PR middle-end/19405 (18_support/numeric_limits.cc fails on ppc-darwin (long doubles))
PR middle-end/19405 * real.h (REAL_MODE_FORMAT_COMPOSITE_P): New macro. * fold-const.c (const_binop): Avoid constant folding floating point operations in modes that use composite representations. * simplify-rtx.c (simplify_binary_operation): Likewise. From-SVN: r94653
Diffstat (limited to 'gcc/real.h')
-rw-r--r--gcc/real.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/real.h b/gcc/real.h
index 13f072e96a8..5c4e9c605d8 100644
--- a/gcc/real.h
+++ b/gcc/real.h
@@ -157,6 +157,12 @@ extern const struct real_format *
#define REAL_MODE_FORMAT(MODE) (real_format_for_mode[(MODE) - MIN_MODE_FLOAT])
+/* The following macro determines whether the floating point format is
+ composite, i.e. may contain non-consecutive mantissa bits, in which
+ case compile-time FP overflow may not model run-time overflow. */
+#define REAL_MODE_FORMAT_COMPOSITE_P(MODE) \
+ ((REAL_MODE_FORMAT(MODE))->pnan < (REAL_MODE_FORMAT (MODE))->p)
+
/* Declare functions in real.c. */
/* Binary or unary arithmetic on tree_code. */