This is the mail archive of the binutils@sources.redhat.com 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]

Re: Why pass HAVE_32BIT_GPRS to OPCODE_IS_MEMBER?


H . J . Lu wrote:
[snip]
>    The gp32 arg is set when you need to force 32-bit register usage on
>    a machine with 64-bit registers; see the documentation under -mgp32
>    in the MIPS gas docs.  */

This comment is possibly misleading. There are three ways to restrict
the assembler to 32bit GPRs: Explicitly by the programmer (-mgp32),
implicitly by the ABI (-mabi=32) and implicitly by the ISA (-mips{1,2,32}
or -march=FOO), where only the latter one can change over an assembly
run. So we need to check only two states: Programmer+ABI and ISA.
The current code checks for three which may get inconsistent.

[snip]
> +#define HAVE_FORCEED_32BIT_GPRS	            \
                     ^
Consistent typo. :-)

> +   (mips_gp32 || mips_32bit_abi)
> +

Why differentiate between forced and non-forced 32bit GPRS?
The assembler should handle both identically.

AFAICS mips_32bit_abi should imply mips_gp32 (and mips_fp32).
Then the check for mips_32bit_abi in HAVE_32BIT_?PRS can go
away and everyone is happy.


Thiemo


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