Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
8bdeb167
Kaydet (Commit)
8bdeb167
authored
Nis 17, 2014
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
support setting fpu precision on m68k (closes #20904)
Patch from Andreas Schwab.
üst
aedff520
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
0 deletions
+69
-0
pyport.h
Include/pyport.h
+19
-0
NEWS
Misc/NEWS
+2
-0
configure
configure
+32
-0
configure.ac
configure.ac
+13
-0
pyconfig.h.in
pyconfig.h.in
+3
-0
No files found.
Include/pyport.h
Dosyayı görüntüle @
8bdeb167
...
...
@@ -588,6 +588,25 @@ extern "C" {
} while (0)
#endif
#ifdef HAVE_GCC_ASM_FOR_MC68881
#define HAVE_PY_SET_53BIT_PRECISION 1
#define _Py_SET_53BIT_PRECISION_HEADER \
unsigned int old_fpcr, new_fpcr
#define _Py_SET_53BIT_PRECISION_START \
do { \
__asm__ ("fmove.l %%fpcr,%0" : "=g" (old_fpcr)); \
/* Set double precision / round to nearest. */
\
new_fpcr = (old_fpcr & ~0xf0) | 0x80; \
if (new_fpcr != old_fpcr) \
__asm__ volatile ("fmove.l %0,%%fpcr" : : "g" (new_fpcr)); \
} while (0)
#define _Py_SET_53BIT_PRECISION_END \
do { \
if (new_fpcr != old_fpcr) \
__asm__ volatile ("fmove.l %0,%%fpcr" : : "g" (old_fpcr)); \
} while (0)
#endif
/* default definitions are empty */
#ifndef HAVE_PY_SET_53BIT_PRECISION
#define _Py_SET_53BIT_PRECISION_HEADER
...
...
Misc/NEWS
Dosyayı görüntüle @
8bdeb167
...
...
@@ -10,6 +10,8 @@ Release date: TBA
Core and Builtins
-----------------
- Issue #20904: Support setting FPU precision on m68k.
- Issue #21209: Fix sending tuples to custom generator objects with the yield
from syntax.
...
...
configure
Dosyayı görüntüle @
8bdeb167
...
...
@@ -13244,6 +13244,38 @@ $as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether we can use gcc inline assembler to get and set mc68881 fpcr"
>
&5
$as_echo_n
"checking whether we can use gcc inline assembler to get and set mc68881 fpcr... "
>
&6
;
}
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
int
main ()
{
unsigned int fpcr;
__asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
__asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
;
return 0;
}
_ACEOF
if
ac_fn_c_try_compile
"
$LINENO
"
;
then
:
have_gcc_asm_for_mc68881
=
yes
else
have_gcc_asm_for_mc68881
=
no
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$have_gcc_asm_for_mc68881
"
>
&5
$as_echo
"
$have_gcc_asm_for_mc68881
"
>
&6
;
}
if
test
"
$have_gcc_asm_for_mc68881
"
=
yes
then
$as_echo
"#define HAVE_GCC_ASM_FOR_MC68881 1"
>>
confdefs.h
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
...
...
configure.ac
Dosyayı görüntüle @
8bdeb167
...
...
@@ -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
...
...
pyconfig.h.in
Dosyayı görüntüle @
8bdeb167
...
...
@@ -313,6 +313,9 @@
/* Define to 1 if you have the `gamma' function. */
#undef HAVE_GAMMA
/* Define if we can use gcc inline assembler to get and set mc68881 fpcr */
#undef HAVE_GCC_ASM_FOR_MC68881
/* Define if we can use x64 gcc inline assembler */
#undef HAVE_GCC_ASM_FOR_X64
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment