mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-22 11:34:09 +02:00
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
This commit is contained in:
parent
13d521bded
commit
15a3ec2567
3 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2013-09-10 Paulo Andrade <pcpa@gnu.org>
|
||||||
|
|
||||||
|
* 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 <pcpa@gnu.org>
|
2013-09-10 Paulo Andrade <pcpa@gnu.org>
|
||||||
|
|
||||||
* lib/jit_s390x-cpu.c: Spill/reload correct callee save
|
* lib/jit_s390x-cpu.c: Spill/reload correct callee save
|
||||||
|
|
|
@ -1880,11 +1880,15 @@ get_float(skip_t skip)
|
||||||
static float
|
static float
|
||||||
make_float(double d)
|
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 (isnan(d)) return ( 0.0f/0.0f);
|
||||||
if (isinf(d)) {
|
if (isinf(d)) {
|
||||||
if (d > 0.0) return ( 1.0f/0.0f);
|
if (d > 0.0) return ( 1.0f/0.0f);
|
||||||
else return (-1.0f/0.0f);
|
else return (-1.0f/0.0f);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return ((float)d);
|
return ((float)d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ AC_PROG_CC
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_LIBTOOL
|
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],,,)
|
AC_CHECK_HEADERS([getopt.h],,,)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue