This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Why pass HAVE_32BIT_GPRS to OPCODE_IS_MEMBER?
- To: binutils at sourceware dot cygnus dot com
- Subject: Re: Why pass HAVE_32BIT_GPRS to OPCODE_IS_MEMBER?
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- Date: Tue, 7 Aug 2001 22:43:16 +0200
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