Skip to content

Conversation

@SakiTakamachi
Copy link
Member

Although there is no actual issue, the current code may trigger undefined behavior (UB) due to signed integer underflow or overflow on NEON environments. These are essentially just noise.

Since modifying the code to suppress this noise ends up making it identical to XSSE, I’ve decided to incorporate XSSE internally within BCMath.

XSSE already has unit tests implemented using cmocka, and since the APIs being used are of the same kind as before and haven't changed, I’ve determined that using XSSE is safe.

The function names for SIMD will now revert to being compatible with the SSE API, as they were previously.

@SakiTakamachi SakiTakamachi changed the title use XSSE for bcmath ext/bcmath: use XSSE Jun 5, 2025
@SakiTakamachi SakiTakamachi marked this pull request as ready for review June 5, 2025 05:00
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not check XSSE code, but the changes to bcmath are right.

@SakiTakamachi SakiTakamachi merged commit 2751064 into php:master Jun 5, 2025
9 checks passed
@SakiTakamachi SakiTakamachi deleted the bcmath/use_xsse branch June 5, 2025 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants