<div dir="ltr">Thanks!<div><br></div><div>Just for completeness, if you want to force T16, should you use</div><div><br></div><div> "-target arm -march=armv6 -mthumb -mfloat-abi=soft"<br></div><div><br></div><div>Or is there a better way?</div><div><br></div><div>(the last option needed because T16 has no access to FP registers, so you'd better either not be using FP arguments/results at all or else compile everything else you link to with softfp as well)</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 18, 2016 at 3:31 PM, Renato Golin <span dir="ltr"><<a href="mailto:renato.golin@linaro.org" target="_blank">renato.golin@linaro.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 18 May 2016 at 13:21, James Molloy via llvm-dev<br>
<span class=""><<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
> Hi,<br>
><br>
> A64 versus A32/T32 code generation is controlled by the -target option which<br>
> I don’t believe is under discussion here.<br>
<br>
</span>Indeed, that is the case. The -target option picks the back-end, and<br>
-march chooses the support level, same as GCC.<br>
<br>
Just to be clear:<br>
<br>
  "-target armv8" implies AArch32, so you can't use "-march=aarch64" with it.<br>
  "-target aarch64" is strictly AArch64, so you can't use<br>
"-march=armv7" or lower with it.<br>
<br>
However, the first case above is an *aberration* and the recommended usage is:<br>
<br>
  "-target arm -march=armv8a" which will select the "ARMv8A AArch32<br>
ARM instruction set".<br>
  "-target aarch64 -march=armv8a" which will select the "ARMv8A<br>
AArch64 instruction set".<br>
<br>
Also, please do *not* use:<br>
<br>
  "-target thumb -march=armv8a", even though it works today in LLVM,<br>
it's another aberration.<br>
<br>
Instead, use:<br>
<br>
  "-target arm -march=armv8a -mthumb". This will correctly choose the<br>
"ARMv8A AArch32 Thumb2 instruction set".<br>
<br>
cheers,<br>
--renato<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
This message has been scanned for viruses and<br>
dangerous content by MailScanner, and is<br>
believed to be clean.<br>
<br>
</div></div></blockquote></div><br></div>