This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [1/2][AArch64, gas] Support ILP32 triplet aarch64*-linux-gnu_ilp32
- From: Nick Clifton <nickc at redhat dot com>
- To: Jiong Wang <jiong dot wang at foss dot arm dot com>, Binutils <binutils at sourceware dot org>
- Date: Thu, 18 May 2017 16:53:00 +0100
- Subject: Re: [1/2][AArch64, gas] Support ILP32 triplet aarch64*-linux-gnu_ilp32
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=nickc at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 91FA8C0B39C5
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 91FA8C0B39C5
- References: <2cdf643e-a546-c7eb-ba41-203aa05a6bcf@foss.arm.com>
Hi Jiong,
> +void
> +aarch64_after_parse_args (void)
> +{
> + if (aarch64_abi != AARCH64_ABI_NONE)
> + return;
> +
> + if (default_arch[7] == '\0')
> + aarch64_abi = AARCH64_ABI_LP64;
> + else
> + aarch64_abi = AARCH64_ABI_ILP32;
The test here strikes me as being rather obtuse. Presumably you are
checking to see if the default_arch string has the :32 extension, but
this is not obvious from the code. Plus it will break if there are
ever any other qualifiers added to the architecture string. I would
suggest at least testing for:
strlen (default_arch) > 7 && strcmp (default_arch + 7, ":32") == 0
Cheers
Nick