This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [1/2][AArch64, gas] Support ILP32 triplet aarch64*-linux-gnu_ilp32


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]