I made the O9 to O3 and added volatile to the pointers intended to force fp
values into memory.

On Fri, Sep 26, 2008 at 6:37 PM, <[EMAIL PROTECTED]> wrote:

> The union trick is not defined in the standard, but apparently supported
> by GCC.


It's there to get around a problem with gcc so that doesn't worry me too
much.  I realize that other compilers may choose to make use of the strict
aliasing rule.  This change doesn't make that situation any better or worse
on those compilers.


>
>
> """The practice of reading from a different union member than the one
> most recently written to (called "type-punning") is common. Even with
> -fstrict-aliasing, type-punning is allowed, provided the memory is
> accessed through the union type."""
>
> I don't know if this applies to MSVC.
>
>
> http://codereview.chromium.org/5007/diff/1/11
> File src/checks.h (right):
>
> http://codereview.chromium.org/5007/diff/1/11#newcode172
> Line 172: if (*exp != *val) {
> The correct way of forcing 64-bit FPU is to use "volatile".
>
>
> http://codereview.chromium.org/5007
>



-- 
Erik Corry, Software Engineer
Google Denmark ApS.  CVR nr. 28 86 69 84
c/o Philip & Partners, 7 Vognmagergade, P.O. Box 2227, DK-1018 Copenhagen K,
Denmark.

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to