UNALIGNED_MEMORY is not supported in the current compiler backend 
(fastcomp). You can use an older version of emscripten which does support 
it. Another option would be to hack fastcomp to do what you want - 
JSBackend.cpp in the fastcomp repo. Searching for "alignment" or 
"Alignment" should find where it is used for loads and stores, can force a 
pessimistic "1" there.

If you feel like implementing the option, that would great of course.

- Alon


On Wednesday, January 7, 2015 2:54:59 PM UTC-8, Boris Sergeev wrote:
>
> Hi All,
>
> Could you, please, explain how one can use UNALIGNED_MEMORY=1?
>
> I'm trying to build a large project, which has hundreds of classes with 
> non-aligned members.
> Using
>         -s WARN_ON_UNDEFINED_SYMBOLS=1
>         -s EXCEPTION_DEBUG=1
>         -s DEMANGLE_SUPPORT=1
> -s ALIASING_FUNCTION_POINTERS=0
> -s SAFE_HEAP=1
> shows all the places with misaligned memory operations, but they are too 
> numerous to fix (I swear I will eventually fix them all!). ;-)
>
> But when I try to use UNALIGNED_MEMORY=1, I get "forced unaligned memory 
> not supported in fastcomp" errors on link.
> Is there a way to force UNALIGNED_MEMORY=1 with the current Emscripten 
> 1.27.0?
>
> Thanks a lot!
> Boris
>

-- 
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