[AArch64] Binutils/gas/ld port for ARM's new 64-bit architecture, AArch64 [4/6] gas changes
nick clifton
nickc@redhat.com
Tue Jul 31 18:23:00 GMT 2012
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
More information about the Binutils
mailing list