Revert "Fix #79595: zend_init_fpu() alters FPU precision"

This reverts commit 88dfc475c5.
This commit is contained in:
Nikita Popov 2020-05-22 16:57:14 +02:00
parent 6ad746488e
commit 10eb842a64
2 changed files with 2 additions and 6 deletions

1
NEWS
View file

@ -8,7 +8,6 @@ PHP NEWS
. Fixed bug #79489 (.user.ini does not inherit). (cmb) . Fixed bug #79489 (.user.ini does not inherit). (cmb)
. Fixed bug #79600 (Regression in 7.4.6 when yielding an array based . Fixed bug #79600 (Regression in 7.4.6 when yielding an array based
generator). (Nikita) generator). (Nikita)
. Fixed bug #79595 (zend_init_fpu() alters FPU precision). (cmb, Nikita)
- FFI: - FFI:
. Fixed bug #79571 (FFI: var_dumping unions may segfault). (cmb) . Fixed bug #79571 (FFI: var_dumping unions may segfault). (cmb)

View file

@ -22,8 +22,7 @@
ZEND_API void zend_init_fpu(void) /* {{{ */ ZEND_API void zend_init_fpu(void) /* {{{ */
{ {
/* under __SSE__ the FPCW is irrelevant; no need to change it */ #if XPFPA_HAVE_CW
#if XPFPA_HAVE_CW && !defined(__SSE__)
XPFPA_DECLARE XPFPA_DECLARE
if (!EG(saved_fpu_cw_ptr)) { if (!EG(saved_fpu_cw_ptr)) {
@ -39,7 +38,7 @@ ZEND_API void zend_init_fpu(void) /* {{{ */
ZEND_API void zend_shutdown_fpu(void) /* {{{ */ ZEND_API void zend_shutdown_fpu(void) /* {{{ */
{ {
#if XPFPA_HAVE_CW && !defined(__SSE__) #if XPFPA_HAVE_CW
if (EG(saved_fpu_cw_ptr)) { if (EG(saved_fpu_cw_ptr)) {
XPFPA_RESTORE_CW(EG(saved_fpu_cw_ptr)); XPFPA_RESTORE_CW(EG(saved_fpu_cw_ptr));
} }
@ -50,10 +49,8 @@ ZEND_API void zend_shutdown_fpu(void) /* {{{ */
ZEND_API void zend_ensure_fpu_mode(void) /* {{{ */ ZEND_API void zend_ensure_fpu_mode(void) /* {{{ */
{ {
#ifndef __SSE__
XPFPA_DECLARE XPFPA_DECLARE
XPFPA_SWITCH_DOUBLE(); XPFPA_SWITCH_DOUBLE();
#endif
} }
/* }}} */ /* }}} */