[llvm-dev] LLVM issuse:AArch64 TargetParser

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Wed May 18 05:31:52 PDT 2016


On 18 May 2016 at 13:21, James Molloy via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Hi,
>
> A64 versus A32/T32 code generation is controlled by the -target option which
> I don’t believe is under discussion here.

Indeed, that is the case. The -target option picks the back-end, and
-march chooses the support level, same as GCC.

Just to be clear:

  "-target armv8" implies AArch32, so you can't use "-march=aarch64" with it.
  "-target aarch64" is strictly AArch64, so you can't use
"-march=armv7" or lower with it.

However, the first case above is an *aberration* and the recommended usage is:

  "-target arm -march=armv8a" which will select the "ARMv8A AArch32
ARM instruction set".
  "-target aarch64 -march=armv8a" which will select the "ARMv8A
AArch64 instruction set".

Also, please do *not* use:

  "-target thumb -march=armv8a", even though it works today in LLVM,
it's another aberration.

Instead, use:

  "-target arm -march=armv8a -mthumb". This will correctly choose the
"ARMv8A AArch32 Thumb2 instruction set".

cheers,
--renato


More information about the llvm-dev mailing list