aboutsummaryrefslogtreecommitdiff
path: root/gcc/libgcc2.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2007-04-24 08:28:21 -0700
committerRichard Henderson <rth@gcc.gnu.org>2007-04-24 08:28:21 -0700
commit5fb54b91980565f03b96cadfc55dff8ddf5236ca (patch)
tree02de3c14605545c31467f9847eec2443b8c6117d /gcc/libgcc2.h
parent688518053c61ccb6d52aa647d6ba6b04fdc1b04c (diff)
downloadgcc-5fb54b91980565f03b96cadfc55dff8ddf5236ca.zip
gcc-5fb54b91980565f03b96cadfc55dff8ddf5236ca.tar.gz
gcc-5fb54b91980565f03b96cadfc55dff8ddf5236ca.tar.bz2
libgcc2.h (AVOID_FP_TYPE_CONVERSION): Rename from IS_IBM_EXTENDED.
* libgcc2.h (AVOID_FP_TYPE_CONVERSION): Rename from IS_IBM_EXTENDED. Also define in terms of WIDEST_HARDWARE_FP_SIZE. * libgcc2.c (__floatdisf): Avoid double-word arithmetic when looking for non-zero bits shifted out. Avoid a recursive call when constructing the scalar. (__floatundisf): Likewise. From-SVN: r124106
Diffstat (limited to 'gcc/libgcc2.h')
-rw-r--r--gcc/libgcc2.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/libgcc2.h b/gcc/libgcc2.h
index b1c749f..c6084dc 100644
--- a/gcc/libgcc2.h
+++ b/gcc/libgcc2.h
@@ -115,10 +115,16 @@ extern void __eprintf (const char *, const char *, unsigned int, const char *)
/* FIXME: This #ifdef probably should be removed, ie. enable the test
for mips too. */
+/* Don't use IBM Extended Double TFmode for TI->SF calculations.
+ The conversion from long double to float suffers from double
+ rounding, because we convert via double. In other cases, going
+ through the software fp routines is much slower than the fallback. */
#ifdef __powerpc__
-#define IS_IBM_EXTENDED(SIZE) (SIZE == 106)
+#define AVOID_FP_TYPE_CONVERSION(SIZE) (SIZE == 106)
+#elif defined(WIDEST_HARDWARE_FP_SIZE)
+#define AVOID_FP_TYPE_CONVERSION(SIZE) (SIZE > WIDEST_HARDWARE_FP_SIZE)
#else
-#define IS_IBM_EXTENDED(SIZE) 0
+#define AVOID_FP_TYPE_CONVERSION(SIZE) 0
#endif
/* In the first part of this file, we are interfacing to calls generated