This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [AArch64] Binutils/gas/ld port for ARM's new 64-bit architecture, AArch64 [4/6] gas changes
- From: nick clifton <nickc at redhat dot com>
- To: Yufeng Zhang <Yufeng dot Zhang at arm dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 31 Jul 2012 16:53:23 +0100
- Subject: Re: [AArch64] Binutils/gas/ld port for ARM's new 64-bit architecture, AArch64 [4/6] gas changes
- References: <50169862.7000705@arm.com> <5016A024.3070503@arm.com>
Hi Yufeng Zhang,
I was not very happy with the code in tc-aarch64.c. Specifically
there are lots of places where functions return an integer when really
they are returning a boolean true/false or pass/fail result. It would
be far more appropriate for these functions to use bfd_boolean as their
return type.
Even more confusing, there are some functions that return 0 to
indicate success and 1 to indicate failure, but their name implies that
the result would be the other way around. For example I would expect
code like this:
if (my_get_expression (&inst.reloc.exp, &p, GE_OPT_PREFIX, 1))
return FAIL;
to actually be coded like this:
if (! my_get_expression (&inst.reloc.exp, &p, GE_OPT_PREFIX, 1))
return FAIL;
so that is reads as "if my_get_expression failed then return FAIL".
Ideally I would very much like to see this port included in the new 2.23
branch, so if you do not have the time to correct this behaviour then I
will understand. But if you *do* have the time, I would appreciate the
effort.
Cheers
Nick