[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 246/437: Use the logic to workaround float NaN and Inf H
From: |
Andy Wingo |
Subject: |
[Guile-commits] 246/437: Use the logic to workaround float NaN and Inf Hercules bug conditional |
Date: |
Mon, 2 Jul 2018 05:14:30 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 15a3ec25677d8923b7eaea0b0caeef1ea6c8141e
Author: pcpa <address@hidden>
Date: Tue Sep 10 21:29:15 2013 -0300
Use the logic to workaround float NaN and Inf Hercules bug conditional
* check/lightning.c, configure.ac: Conditionally use the
code written to workaround a bug in the Hercules emulator,
as isnan and isinf are not available at least on HP-UX ia64.
enter the commit message for your changes. Lines starting
---
ChangeLog | 6 ++++++
check/lightning.c | 4 ++++
configure.ac | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 0f70ff3..3743658 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2013-09-10 Paulo Andrade <address@hidden>
+ * check/lightning.c, configure.ac: Conditionally use the
+ code written to workaround a bug in the Hercules emulator,
+ as isnan and isinf are not available at least on HP-UX ia64.
+
+2013-09-10 Paulo Andrade <address@hidden>
+
* lib/jit_s390x-cpu.c: Spill/reload correct callee save
float registers.
diff --git a/check/lightning.c b/check/lightning.c
index 7ddd17a..2cf38ed 100644
--- a/check/lightning.c
+++ b/check/lightning.c
@@ -1880,11 +1880,15 @@ get_float(skip_t skip)
static float
make_float(double d)
{
+ /* This is an workaround to a bug in Hercules s390x emulator,
+ * and at least HP-UX ia64 not have these */
+#if defined(HAVE_ISNAN) && defined(HAVE_ISINF)
if (isnan(d)) return ( 0.0f/0.0f);
if (isinf(d)) {
if (d > 0.0) return ( 1.0f/0.0f);
else return (-1.0f/0.0f);
}
+#endif
return ((float)d);
}
diff --git a/configure.ac b/configure.ac
index 4f645df..3741452 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,7 @@ AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
-AC_CHECK_FUNCS(mremap ffsl getopt_long_only,,)
+AC_CHECK_FUNCS(mremap ffsl getopt_long_only isnan isinf,,)
AC_CHECK_HEADERS([getopt.h],,,)
- [Guile-commits] 210/437: Correct all ldst test cases., (continued)
- [Guile-commits] 210/437: Correct all ldst test cases., Andy Wingo, 2018/07/02
- [Guile-commits] 252/437: GNU lightning 2.0.1 release, Andy Wingo, 2018/07/02
- [Guile-commits] 327/437: Force creation of the m4 directory on a clean checkout, Andy Wingo, 2018/07/02
- [Guile-commits] 314/437: Add back files missed when reapplying patches, Andy Wingo, 2018/07/02
- [Guile-commits] 354/437: Implement the jit_arg_register_p predicate., Andy Wingo, 2018/07/02
- [Guile-commits] 381/437: Remove wrong comment after cut and paste, Andy Wingo, 2018/07/02
- [Guile-commits] 209/437: Correct float division and LX with stop code generation., Andy Wingo, 2018/07/02
- [Guile-commits] 280/437: Implement the new jit_set_code interface., Andy Wingo, 2018/07/02
- [Guile-commits] 284/437: ARM: Do not emit a nop stack adjust instruction., Andy Wingo, 2018/07/02
- [Guile-commits] 345/437: PPC: Implement and use mcrxr emulation by default, Andy Wingo, 2018/07/02
- [Guile-commits] 246/437: Use the logic to workaround float NaN and Inf Hercules bug conditional,
Andy Wingo <=
- [Guile-commits] 363/437: Correct typo, Andy Wingo, 2018/07/02
- [Guile-commits] 383/437: ia64: Implement cache flush., Andy Wingo, 2018/07/02
- [Guile-commits] 371/437: Correct read of freed memory, Andy Wingo, 2018/07/02
- [Guile-commits] 342/437: x86: Implement support for the x32 abi, Andy Wingo, 2018/07/02
- [Guile-commits] 416/437: Build and pass all tests on 32 and 64 bit sparc, Andy Wingo, 2018/07/02
- [Guile-commits] 400/437: Correct missing jit_unget_reg calls, Andy Wingo, 2018/07/02
- [Guile-commits] 418/437: Correct typo and values in jit_sparc-sz.c, Andy Wingo, 2018/07/02
- [Guile-commits] 359/437: ARM: Regenerate size table for hard float armv7 or newer., Andy Wingo, 2018/07/02
- [Guile-commits] 396/437: Move definition of jit_va_ codes, cosmetic change., Andy Wingo, 2018/07/02
- [Guile-commits] 407/437: Update copyright year, Andy Wingo, 2018/07/02