Skip to content

Commit de58b64

Browse files
committed
gh-145633: remove support for ancient ARM platforms with mixed-endian doubles
* drop DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 macro * use DOUBLE_IS_BIG/LITTLE_ENDIAN_IEEE754 to detect endianness of float/doubles * drop "unknown_format" code path in PyFloat_Pack/Unpack*()
1 parent 9159287 commit de58b64

8 files changed

Lines changed: 121 additions & 510 deletions

File tree

Include/internal/pycore_pymath.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ extern void _Py_set_387controlword(unsigned short);
182182
// (extended precision), and we don't know how to change
183183
// the rounding precision.
184184
#if !defined(DOUBLE_IS_LITTLE_ENDIAN_IEEE754) && \
185-
!defined(DOUBLE_IS_BIG_ENDIAN_IEEE754) && \
186-
!defined(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754)
185+
!defined(DOUBLE_IS_BIG_ENDIAN_IEEE754)
187186
# define _PY_SHORT_FLOAT_REPR 0
188187
#endif
189188

Include/pymacconfig.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#undef SIZEOF_UINTPTR_T
1919
#undef SIZEOF_PTHREAD_T
2020
#undef WORDS_BIGENDIAN
21-
#undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754
2221
#undef DOUBLE_IS_BIG_ENDIAN_IEEE754
2322
#undef DOUBLE_IS_LITTLE_ENDIAN_IEEE754
2423
#undef HAVE_GCC_ASM_FOR_X87
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Remove support for ancient ARM platforms, using mixed-endian representation
2+
for doubles. Patch by Sergey B Kirpichev.

0 commit comments

Comments
 (0)