summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-04-17 04:00:31 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-04-17 04:00:31 (GMT)
commit8bdeb1672ce1d0412e1fcc6cff0821bb66f02c1a (patch)
tree7b85e22dad6f12ebd3f33825d91c7d3855de38d2 /configure.ac
parentaedff520eab83c48848d2346d6f55cc1579182ef (diff)
downloadcpython-8bdeb1672ce1d0412e1fcc6cff0821bb66f02c1a.zip
cpython-8bdeb1672ce1d0412e1fcc6cff0821bb66f02c1a.tar.gz
cpython-8bdeb1672ce1d0412e1fcc6cff0821bb66f02c1a.tar.bz2
support setting fpu precision on m68k (closes #20904)
Patch from Andreas Schwab.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 457819b..f2e4b1c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3810,6 +3810,19 @@ then
[Define if we can use gcc inline assembler to get and set x87 control word])
fi
+AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set mc68881 fpcr)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ unsigned int fpcr;
+ __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
+ __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
+]])],[have_gcc_asm_for_mc68881=yes],[have_gcc_asm_for_mc68881=no])
+AC_MSG_RESULT($have_gcc_asm_for_mc68881)
+if test "$have_gcc_asm_for_mc68881" = yes
+then
+ AC_DEFINE(HAVE_GCC_ASM_FOR_MC68881, 1,
+ [Define if we can use gcc inline assembler to get and set mc68881 fpcr])
+fi
+
# Detect whether system arithmetic is subject to x87-style double
# rounding issues. The result of this test has little meaning on non
# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding