[llvm-dev] LLVM issuse:AArch64 TargetParser

Bruce Hoult via llvm-dev llvm-dev at lists.llvm.org
Wed May 18 05:46:39 PDT 2016


Thanks!

Just for completeness, if you want to force T16, should you use

 "-target arm -march=armv6 -mthumb -mfloat-abi=soft"

Or is there a better way?

(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)


On Wed, May 18, 2016 at 3:31 PM, Renato Golin <renato.golin at linaro.org>
wrote:

> 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
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160518/fc930380/attachment.html>


More information about the llvm-dev mailing list