summaryrefslogtreecommitdiffstats
path: root/Python/pymath.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-10-11 21:09:40 (GMT)
committerGitHub <noreply@github.com>2021-10-11 21:09:40 (GMT)
commit7103356455c8b0c2ba3523929327756413337a31 (patch)
tree7fc7286a502fe00cf42bd2f9c6759064f0f6df82 /Python/pymath.c
parenta9fe1a8e5b4698937e06c2c419da92e6f78f2ee7 (diff)
downloadcpython-7103356455c8b0c2ba3523929327756413337a31.zip
cpython-7103356455c8b0c2ba3523929327756413337a31.tar.gz
cpython-7103356455c8b0c2ba3523929327756413337a31.tar.bz2
bpo-45412: Move _Py_SET_53BIT_PRECISION_START to pycore_pymath.h (GH-28882)
Move the following macros , to pycore_pymath.h (internal C API): * _Py_SET_53BIT_PRECISION_HEADER * _Py_SET_53BIT_PRECISION_START * _Py_SET_53BIT_PRECISION_END PEP 7: add braces to if and "do { ... } while (0)" in these macros. Move also _Py_get_387controlword() and _Py_set_387controlword() definitions to pycore_pymath.h. These functions are no longer exported. pystrtod.c now includes pycore_pymath.h.
Diffstat (limited to 'Python/pymath.c')
-rw-r--r--Python/pymath.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Python/pymath.c b/Python/pymath.c
index 24b8042..d3c52a0 100644
--- a/Python/pymath.c
+++ b/Python/pymath.c
@@ -13,10 +13,10 @@ double _Py_force_double(double x)
}
#endif
-#ifdef HAVE_GCC_ASM_FOR_X87
-/* inline assembly for getting and setting the 387 FPU control word on
- gcc/x86 */
+#ifdef HAVE_GCC_ASM_FOR_X87
+// Inline assembly for getting and setting the 387 FPU control word on
+// GCC/x86.
#ifdef _Py_MEMORY_SANITIZER
__attribute__((no_sanitize_memory))
#endif
@@ -29,8 +29,7 @@ unsigned short _Py_get_387controlword(void) {
void _Py_set_387controlword(unsigned short cw) {
__asm__ __volatile__ ("fldcw %0" : : "m" (cw));
}
-
-#endif
+#endif // HAVE_GCC_ASM_FOR_X87
#ifndef HAVE_HYPOT