[PATCH][MIPS] Rework GPR and FPR size checks
Richard Sandiford
rdsandiford@googlemail.com
Tue May 13 07:09:00 GMT 2014
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
More information about the Binutils
mailing list