<div dir="ltr"><div>Hi Jeroen,</div><div><br></div>AFAIK, if you don't specify strict-align, the back-end assumes unaligned access is ok, so the behaviour is already covered.<div><br></div><div>If you want GCC compatibility, you could just add the alias to strict align, and a dummy option to no-strict-align?<br>
<div><br></div><div>cheers,</div><div>--renato</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 17 August 2013 09:46, Jeroen Hofstee <span dir="ltr"><<a href="mailto:clang@myspectrum.nl" target="_blank">clang@myspectrum.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
In commit [1] mstrict-align is added as a cc1 option for ARM.<br>
"Force all memory accesses to be aligned. (ARM only)"<br>
<br>
GCC has this flag, but only for powerpc, which states:<br>
"On System V.4 and embedded PowerPC systems do not (do)<br>
assume that unaligned memory references are handled by<br>
the system. "<br>
<br>
On ARM gcc supports the -munaligned-access / -mno-unaligned-access,<br>
flags, which I am looking for:<br>
<br>
"Enables (or disables) reading and writing of 16- and 32- bit<br>
values from addresses that are not 16- or 32- bit aligned.<br>
By default unaligned access is disabled for all pre-ARMv6<br>
and all ARMv6-M architectures, and enabled for all other<br>
architectures. If unaligned access is not enabled then<br>
words in packed data structures will be accessed a byte<br>
at a time."<br>
<br>
I am not sure if there are subtle differences between these.<br>
Attached patch assumes they are exactly the same and adds<br>
the gcc flags while preserving the cc1 as well.<br>
<br>
This patch depends on the -ffixed-r9 patch for creating the<br>
ARM specific group.<br>
<br>
Regards,<br>
Jeroen<br>
<br>
[1] <a href="http://llvm.org/viewvc/llvm-project?view=revision&revision=167619" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?view=revision&<u></u>revision=167619</a><br>
[2] <a href="http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options" target="_blank">http://gcc.gnu.org/onlinedocs/<u></u>gcc-4.8.1/gcc/RS_002f6000-and-<u></u>PowerPC-Options.html#RS_<u></u>002f6000-and-PowerPC-Options</a><br>

[3] <a href="http://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/ARM-Options.html#ARM-Options" target="_blank">http://gcc.gnu.org/onlinedocs/<u></u>gcc-4.8.1/gcc/ARM-Options.<u></u>html#ARM-Options</a><br>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>