[PATCH] jscript: Force base type of _jsval_t to be ULONGLONG instead of double.
Dmitry Timoshkov
dmitry at baikal.ru
Wed Mar 24 12:32:25 CDT 2021
Gabriel Ivăncescu <gabrielopcode at gmail.com> wrote:
> On 24/03/2021 15:02, Dmitry Timoshkov wrote:
> > Gabriel Ivăncescu <gabrielopcode at gmail.com> wrote:
> >
> >> Looks like a bug in Clang to me, although working around it is fine, but
> >> it's not my call.
> >>
> >> Nevertheless I think you should report it to Clang so they fix it.
> >
> > Why do you think that it's a clang bug? Using fldl + fstpl to store and
> > fetch the double to/from the floating point stack is perfectly legitimate.
> >
>
> Well, because jsval_t is a union, not a double. Shouldn't assignment be
> a bitwise copy? The compiler can't know what actual type is used by the
> union here. Unless I misremember the C standard.
If I understand correctly, the compiler have chosen the memeber of
a maximal bits width and used it for a copy. That's unfortunate that
the chosen member happened to be of type 'double', and as a result
floating point instructions were used to perform the copying operation.
--
Dmitry.
More information about the wine-devel
mailing list