For completeness, the default behavior is in ARMSubtarget.cpp:
      // Assume pre-ARMv6 doesn't support unaligned accesses.
      //
      // ARMv6 may or may not support unaligned accesses depending on the
      // SCTLR.U bit, which is architecture-specific. We assume ARMv6
      // Darwin targets support unaligned accesses, and others don't.
      //
      // ARMv7 always has SCTLR.U set to 1, but it has a new SCTLR.A bit
      // which raises an alignment fault on unaligned accesses. Linux
      // defaults this bit to 0 and handles it as a system-wide (not
      // per-process) setting. It is therefore safe to assume that ARMv7+
      // Linux targets support unaligned accesses. The same goes for NaCl.
      //
      // The above behavior is consistent with GCC.

The change lgtm.


On Sun, Aug 18, 2013 at 6:15 AM, Renato Golin <[email protected]>wrote:

> On 18 August 2013 08:17, Jeroen Hofstee <[email protected]> wrote:
>
>> If I make -munaligned-access a dummy (at least that what
>> I guess you mean), there is no proper way to allow unaligned
>> accesses on say one of the BSDs or e.g. armv6 and linux.
>> Both flags are needed to control alignment behaviour in general.
>>
>
> Good point. LGTM.
>
> --renato
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to