Emscripten/JS is a little endian platform, just like X86, so the same code
paths should work for JS and X86. It is ok to test for this at runtime and
do different things based on the result. Just make sure that the JS
platform correctly takes the little endian path and that should be all good
there.


2014-05-07 9:49 GMT+03:00 Christoph Husse <[email protected]>:

> Okay thanks for that input. Gonna try it today. Maybe SAFE_HEAP was off
> because I didn't get any output.
>
> Besides what you have recommended, I was working on "un-stding" my sources
> yesterday with success. There are NO standard library headers and also no
> memory allocations (everything froma  static buffer) and no conditional
> compilation macros... All types are the same size and sign on all platforms
> now.
>
> Only left is the big/little endian thing. Do you know if it is okay to do
> runtime code switches based on endianess? The code needs to take different
> paths depending on endianess... Its a very low level CPU emulator, so there
> is a lot of very platform specific low-level code in it.
>
>
> --
> 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