This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [AArch64][4/4] Define TC_ADDRESS_BYTES for GAS
- From: Yury Norov <ynorov at caviumnetworks dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Jiong Wang <jiong dot wang at foss dot arm dot com>, Binutils <binutils at sourceware dot org>
- Date: Tue, 6 Dec 2016 16:41:40 +0530
- Subject: Re: [AArch64][4/4] Define TC_ADDRESS_BYTES for GAS
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Yuri dot Norov at caviumnetworks dot com;
- References: <2217462f-42bd-83e0-6141-acd62e8becb8@foss.arm.com> <4a2dc012-d289-319a-3557-14266fe3510b@foss.arm.com> <2eaf8fdb-6e7d-1f9b-8ef3-fe0c1d5577c9@foss.arm.com> <06d11737-ef5a-05e7-24d1-8541bfc94e09@foss.arm.com> <mvmh96hjpqm.fsf@hawking.suse.de>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Tue, Dec 06, 2016 at 11:50:25AM +0100, Andreas Schwab wrote:
> On Dez 05 2016, Jiong Wang <jiong.wang@foss.arm.com> wrote:
>
> > The default address_per_bytes is define in cpu-aarch64.c, current it's 8 for
> > both LP64 and ILP32, whether we should change it to 4 as well as word_per_bytes
> > looks to me is another issue we need to investigate.
>
> This works for me and fixes quite a few failures:
>
> * cpu-aarch64.c (N): Add argument ADDRSIZE.
> (bfd_aarch64_arch_ilp32): Set it to 32.
> (bfd_aarch64_arch): Set it to 64.
> ---
> bfd/cpu-aarch64.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/bfd/cpu-aarch64.c b/bfd/cpu-aarch64.c
> index 596d24190b..af2da8455d 100644
> --- a/bfd/cpu-aarch64.c
> +++ b/bfd/cpu-aarch64.c
> @@ -100,16 +100,16 @@ scan (const struct bfd_arch_info *info, const char *string)
> return FALSE;
> }
>
> -#define N(NUMBER, PRINT, DEFAULT, NEXT) \
> - { 64, 64, 8, bfd_arch_aarch64, NUMBER, \
> +#define N(NUMBER, PRINT, ADDRSIZE, DEFAULT, NEXT) \
> + { 64, ADDRSIZE, 8, bfd_arch_aarch64, NUMBER, \
> "aarch64", PRINT, 4, DEFAULT, compatible, scan, \
> bfd_arch_default_fill, NEXT }
>
> static const bfd_arch_info_type bfd_aarch64_arch_ilp32 =
> - N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", FALSE, NULL);
> + N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, FALSE, NULL);
>
> const bfd_arch_info_type bfd_aarch64_arch =
> - N (0, "aarch64", TRUE, &bfd_aarch64_arch_ilp32);
> + N (0, "aarch64", 64, TRUE, &bfd_aarch64_arch_ilp32);
The first argument of macro is bits_per_word. I think it should also
be 32. Though, I didn't test it yet...
Yury.