Skip to content

Fix #79595: zend_init_fpu() alters FPU precision #5621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented May 25, 2020

On startup, PHP deliberately changes the floating point control word to
enforce binary64 format for the calculations for best consistency
across platforms. However, this is unnessary for x86_64 architectures,
because in this case SSE instructions are used by default, and there is
no good reason to pass -mfpmath=i387 or such.

Therefore, we can skip the modification, which has the benefit that
system libraries are free to work in the mode of their liking.


This is supposed to supersede PR #5602. I've targeted master to have the i386 tests running.

On startup, PHP deliberately changes the floating point control word to
enforce binary64 format for the calculations for best consistency
across platforms.  However, this is unnessary for x86_64 architectures,
because in this case SSE instructions are used by default, and there is
no good reason to pass `-mfpmath=i387` or such.

Therefore, we can skip the modification, which has the benefit that
system libraries are free to work in the mode of their liking.
@cmb69
Copy link
Member Author

cmb69 commented May 26, 2020

Thanks! Applied as 879004d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants