Skip to content

math: use fpclassify for isinf on PowerPC to avoid QEMU xststdcsp bug - #1421

Merged
mr-c merged 1 commit into
simd-everywhere:masterfrom
fo40225:fix_gcc15_ppc64
Aug 3, 2026
Merged

math: use fpclassify for isinf on PowerPC to avoid QEMU xststdcsp bug#1421
mr-c merged 1 commit into
simd-everywhere:masterfrom
fo40225:fix_gcc15_ppc64

Conversation

@fo40225

@fo40225 fo40225 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

On PowerPC, avoid __builtin_isinf/__builtin_isinff — QEMU incorrectly emulates the xststdcsp instruction used by GCC 15+ for these builtins, causing subnormal floats to be misclassified as infinity. fpclassify() is immune to this bug on all GCC/QEMU versions.

On PowerPC, avoid __builtin_isinf/__builtin_isinff — QEMU incorrectly
emulates the xststdcsp instruction used by GCC 15+ for these builtins,
causing subnormal floats to be misclassified as infinity.
fpclassify() is immune to this bug on all GCC/QEMU versions.
@fo40225
fo40225 marked this pull request as ready for review August 1, 2026 13:41
@mr-c
mr-c merged commit 367716f into simd-everywhere:master Aug 3, 2026
239 of 244 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants