I don't think I'm following.  Bit cast should be solving the same
problem without the need for a union?

On Sat, Sep 27, 2008 at 1:29 AM, Erik Corry <[EMAIL PROTECTED]> wrote:
>
>
> On Sat, Sep 27, 2008 at 1:23 AM, Dean McNamee <[EMAIL PROTECTED]> wrote:
>>
>> On Sat, Sep 27, 2008 at 12:59 AM, Erik Corry <[EMAIL PROTECTED]> wrote:
>> > 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.
>>
>> Yes, but why do it the wrong way, when you can as easily have done it
>> the right way?
>
> I'm not sure what you consider the right way.  If it's bit_cast then that
> appears to solve a different problem.
>
>>
>> >
>> >>
>> >> """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.
>> >
>>
>> >>
>
>
>
> --
> 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