I suspect we just never implemented i64 support for makeGetValue. But it
could only work on the range of i64s representable in doubles anyhow, so
this is probably not that good an idea. If you can treat i64s as pairs of
i32s, that would be better.

- Alon


On Tue, Dec 2, 2014 at 4:20 AM, Pepijn Van Eeckhoudt <
[email protected]> wrote:

>  I'm generating code that contains pairs of macro calls of the form
>
> {{{ makeSetValue('ptr', '8', 'x', 'i64') }}}
>
> and
>
> x = {{{ makeGetValue('ptr', '8', 'i64') }}}
>
>
> The compiler converts this to
>
> (tempI64 = [x>>>0,(tempDouble=x,(+(Math_abs(tempDouble))) >= 1.0 ? 
> (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 
> 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - 
> +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 
> 0)],HEAP32[(((ptr)+(8))>>2)]=tempI64[0],HEAP32[(((ptr)+(12))>>2)]=tempI64[1])
>
> and
>
> x = HEAP32[(((ptr)+(8))>>2)]
>
> respectively.
>
> The former is what I expected, the latter not quite. It seems that the
> generated code is not symmetrical for i64 values. Is this a bug, known
> limitation, missing feature, ...? Or am I using the makeGetValue macro
> incorrectly?
>
> Thanks,
>
> Pepijn
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to