Hmm, looking in the code, I don't see FORCE_ALIGNED_MEMORY doing anything
in fastcomp. I'll add a warning in emcc. I think there was an issue on this
where it was requested, but looks like no one implemented it.

In general, we receive alignment info from LLVM. While in C unaligned reads
are generally undefined behavior, LLVM will mark - in some cases - such
reads as being unaligned. We then emit slower code to do them safely. In
portable code without undefined behavior, unaligned reads and writes should
not happen, so this should not be a common issue.

We do have a WARN_UNALIGNED option that works in fastcomp, which will note
all unaligned reads and writes and compile time SAFE_HEAP will assert on
them at runtime.

- Alon


On Sat, Jan 31, 2015 at 7:55 AM, Boris Gjenero <[email protected]>
wrote:

> Emscripten has two options for alignment: UNALIGNED_MEMORY
> and FORCE_ALIGNED_MEMORY. According to
> https://groups.google.com/forum/#!msg/emscripten-discuss/M1trmeS4iGc/lHPykRmv-iUJ
>  UNALIGNED_MEMORY=1
> is not supported by fastcomp. However, FORCE_ALIGNED_MEMORY does change
> generated code.
>
> Which alignment issues are handled by FORCE_ALIGNED_MEMORY=0?
>
> --
> 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