[llvm-dev] LLVM issuse:AArch64 TargetParser
Jojo Ma via llvm-dev
llvm-dev at lists.llvm.org
Fri May 6 00:15:09 PDT 2016
Hi Bradley & Renato,
Thank you very much!
> > Allowing -march=aarch64/arm64 is somewhat misleading I think, -march is
> used
> > for specifying an architecture version to target whereas aarch64/arm64
> don’t
> > convey any information to that effect, does it mean armv8a, armv8.1-a,
> etc?
>
> That's a good point. But also, what does "armv8a" mean? AArch64? AArch32?
>
> I guess we could use the triple (which has aarch64 or arm in it), but
> then it will need the triple or else we'll have a problem, since the
> current interpretation of "armv8a" is AArch32.
I agree with you two. Using -march=aarch64/arm64 is a bit misleading,as
Bradley said.
I did some tests on the things renato mentioned.Only when we specified
aarch64 in the triple,
-march=armv8+ be interpreted to AArch64,otherwise AArch32.
> Personally I’m in favor of having that be rejected, it would be good to
> have
> > TargetParser/Clang generally reject CPUs/architectures that are not
> valid or
> > don’t add information as opposed to converting them to a fairly arbitrary
> > choice (that will and does only cause confusion).
>
> Rejecting that on -march is independent than rejecting that in the
> target parser.
>
> I think the logic of refusing this or that "arch" string in this or
> that tool should be restricted to the tool, not the parser.
>
> Means, we still have to worry about the parser's ability to understand
> armv8+ with respect to AArch64 vs AArch32.
>
> I could suggest we use -m32/-m64, but I won't. :)
Actually,I found there is a same problem for arm.For this case,I think
maybe we can play a trick in the clang.
Checking whether the given arch valid or not,before we throw it to the
parser,which can be used for both arm
and aarch64.
On 6 May 2016 at 00:16, Renato Golin <renato.golin at linaro.org> wrote:
> On 5 May 2016 at 13:01, Bradley Smith <Bradley.Smith at arm.com> wrote:
> > Allowing -march=aarch64/arm64 is somewhat misleading I think, -march is
> used
> > for specifying an architecture version to target whereas aarch64/arm64
> don’t
> > convey any information to that effect, does it mean armv8a, armv8.1-a,
> etc?
>
> Hi Bradley,
>
> That's a good point. But also, what does "armv8a" mean? AArch64? AArch32?
>
> I guess we could use the triple (which has aarch64 or arm in it), but
> then it will need the triple or else we'll have a problem, since the
> current interpretation of "armv8a" is AArch32.
>
>
> > Personally I’m in favor of having that be rejected, it would be good to
> have
> > TargetParser/Clang generally reject CPUs/architectures that are not
> valid or
> > don’t add information as opposed to converting them to a fairly arbitrary
> > choice (that will and does only cause confusion).
>
> Rejecting that on -march is independent than rejecting that in the
> target parser.
>
> I think the logic of refusing this or that "arch" string in this or
> that tool should be restricted to the tool, not the parser.
>
> Means, we still have to worry about the parser's ability to understand
> armv8+ with respect to AArch64 vs AArch32.
>
> I could suggest we use -m32/-m64, but I won't. :)
>
> cheers,
> --renato
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160506/b215297f/attachment.html>
More information about the llvm-dev
mailing list