Merged revisions 76300 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76300 | mark.dickinson | 2009-11-15 13:12:43 +0000 (Sun, 15 Nov 2009) | 3 lines

  Issue #5792:  Extend short float repr support to x86 platforms using suncc or icc.
  Many thanks Stefan Krah for help and OpenSolaris testing.
........
This commit is contained in:
Mark Dickinson 2009-11-15 13:47:27 +00:00
parent b43dbc26f9
commit f4243f6d1f
3 changed files with 32 additions and 31 deletions

View File

@ -358,6 +358,9 @@ Extension Modules
Build Build
----- -----
- Issue #5792: Extend the short float repr support to x86 systems using
icc or suncc.
- Issue #6603: Change READ_TIMESTAMP macro in ceval.c so that it - Issue #6603: Change READ_TIMESTAMP macro in ceval.c so that it
compiles correctly under gcc on x86-64. This fixes a reported compiles correctly under gcc on x86-64. This fixes a reported
problem with the --with-tsc build on x86-64. problem with the --with-tsc build on x86-64.

11
configure vendored
View File

@ -22945,12 +22945,12 @@ fi
# correctly-rounded string <-> double conversion functions from # correctly-rounded string <-> double conversion functions from
# Python/dtoa.c, which in turn require that the FPU uses 53-bit # Python/dtoa.c, which in turn require that the FPU uses 53-bit
# rounding; this is a problem on x86, where the x87 FPU has a default # rounding; this is a problem on x86, where the x87 FPU has a default
# rounding precision of 64 bits. For gcc/x86, we try to fix this by # rounding precision of 64 bits. For gcc/x86, we can fix this by
# using inline assembler to get and set the x87 FPU control word. # using inline assembler to get and set the x87 FPU control word.
if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
then # This inline assembler syntax may also work for suncc and icc,
# Check that it's okay to use gcc inline assembler to get and set # so we try it on all platforms.
# x87 control word. It should be, but you never know...
{ echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; } echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF cat >conftest.$ac_ext <<_ACEOF
@ -23008,7 +23008,6 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF _ACEOF
fi fi
fi
# Detect whether system arithmetic is subject to x87-style double # Detect whether system arithmetic is subject to x87-style double
# rounding issues. The result of this test has little meaning on non # rounding issues. The result of this test has little meaning on non

View File

@ -3191,12 +3191,12 @@ fi
# correctly-rounded string <-> double conversion functions from # correctly-rounded string <-> double conversion functions from
# Python/dtoa.c, which in turn require that the FPU uses 53-bit # Python/dtoa.c, which in turn require that the FPU uses 53-bit
# rounding; this is a problem on x86, where the x87 FPU has a default # rounding; this is a problem on x86, where the x87 FPU has a default
# rounding precision of 64 bits. For gcc/x86, we try to fix this by # rounding precision of 64 bits. For gcc/x86, we can fix this by
# using inline assembler to get and set the x87 FPU control word. # using inline assembler to get and set the x87 FPU control word.
if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
then # This inline assembler syntax may also work for suncc and icc,
# Check that it's okay to use gcc inline assembler to get and set # so we try it on all platforms.
# x87 control word. It should be, but you never know...
AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set x87 control word) AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set x87 control word)
AC_TRY_COMPILE([], [ AC_TRY_COMPILE([], [
unsigned short cw; unsigned short cw;
@ -3210,7 +3210,6 @@ then
AC_DEFINE(HAVE_GCC_ASM_FOR_X87, 1, AC_DEFINE(HAVE_GCC_ASM_FOR_X87, 1,
[Define if we can use gcc inline assembler to get and set x87 control word]) [Define if we can use gcc inline assembler to get and set x87 control word])
fi fi
fi
# Detect whether system arithmetic is subject to x87-style double # Detect whether system arithmetic is subject to x87-style double
# rounding issues. The result of this test has little meaning on non # rounding issues. The result of this test has little meaning on non