Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_3) / Zend.m4 acinclude.m4 zend_float.h zend_operators.c zend_strtod.c /tests float_prec_001.phpt

[email protected] (Pierre Joye) Wed, 18 Mar 2009 08:31:23 +0100
Newsgroups php.zend-engine.cvs
Message-ID <[email protected]>
hi Christian,

Please discuss it on internals, the CVS lists does not aim to host
discsussions, even if many people are CC'ed.

On Wed, Mar 18, 2009 at 3:08 AM, Christian Seiler <[email protected]> wrote:
> Hi Dmitry,
>
> Here's a first draft of a patch for the issue:
>
> http://www.christian-seiler.de/temp/php/2009-03-17/fpu-cw-performance-5.3.patch
>
> The idea is the following: When the compiler is initialized, the current
> FPU control word is stored and when the compiler is shut down (end of
> request) the saved FPU control word is restored. Since the data type of
> the control word is not a priori clear (it depends on the selected
> platform/compiler combination), I've added a void * pointer to
> compiler_globals that is allocated upon storage of the control word.
> This ensures that the compiler_globals structure does not have to care
> about the data type of the control word and thus ensuring higher binary
> compability.
>
> Note: The compiler may not be the best place to initialize this stuff
> (and compiler_globals not the best place to store it). As I said: It's a
> first draft.
>
> I also added the following function: zend_ensure_fpu_mode() This is
> currently not used, it is however intended as a means for extensions
> that call library functions that are known to change the control word -
> should those exist at all. The idea would be to call the above function
> after calling the library function in order to ensure that PHP always
> uses the corrent control word.
>
> Also, I didn't have time to test that on different platforms, I only did
> that on Linux. Since I haven't changed any platform-dependent logic
> behind all of this, I'm extremely confident that I didn't break anything
> but one never knows...
>
> Regards,
> Christian
>
> --
> Zend Engine CVS Mailing List (http://cvs.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org