This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][MIPS] Rework GPR and FPR size checks
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Cc: "macro\ at codesourcery dot com" <macro at codesourcery dot com>, "Joseph Myers \(joseph\ at codesourcery dot com\)" <joseph at codesourcery dot com>, "binutils\ at sourceware dot org" <binutils at sourceware dot org>, Rich Fuhler <Rich dot Fuhler at imgtec dot com>, Andrew Bennett <Andrew dot Bennett at imgtec dot com>
- Date: Tue, 13 May 2014 08:09:46 +0100
- Subject: Re: [PATCH][MIPS] Rework GPR and FPR size checks
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B0235352A99E at LEMAIL01 dot le dot imgtec dot org>
Matthew Fortune <Matthew.Fortune@imgtec.com> writes:
> @@ -562,7 +563,7 @@ static int mips_32bitmode = 0;
> ((mips_opts.mips16 | mips_opts.micromips) != 0)
>
> /* The minimum and maximum signed values that can be stored in a GPR. */
> -#define GPR_SMAX ((offsetT) (((valueT) 1 << (HAVE_64BIT_GPRS ? 63 : 31)) - 1))
> +#define GPR_SMAX ((offsetT) (((valueT) 1 << (GPR_SIZE == 64 ? 63 : 31)) - 1))
> #define GPR_SMIN (-GPR_SMAX - 1)
GPR_SIZE - 1 seems more natural.
> @@ -5367,7 +5368,7 @@ match_float_constant (struct mips_arg_info *arg, expressionS *imm,
> but the GPRs are only 32 bits wide. */
> /* ??? No longer true with the addition of MTHC1, but this
> is legacy code... */
> - && (using_gprs || !(HAVE_64BIT_FPRS && HAVE_32BIT_GPRS))
> + && (using_gprs || !(FPR_SIZE == 64 && GPR_SIZE != 64))
> && ((data[0] == 0 && data[1] == 0)
> || (data[2] == 0 && data[3] == 0))
> && ((data[4] == 0 && data[5] == 0)
I think all GPR_SIZE != 64 should be GPR_SIZE == 32. There's no real
prospect of having a "gp=xx" option (I hope) and the GPR_SIZE != 64
paths really only make sense for 32 bit and not (say) 128 bits.
OK with those changes, thanks.
Richard