Patch to add -mfp32 support to MIPS gas
Thiemo Seufer
ica2_ts@csv.ica.uni-stuttgart.de
Thu Jul 19 16:11:00 GMT 2001
Richard Sandiford wrote:
>
> At the moment, MIPS gas uses:
>
> ISA_HAS_64BIT_REGS (mips_opts.isa)
>
> to decide what size the registers are and:
>
> bfd_arch_bits_per_address (stdoutput) == 32
> || ! ISA_HAS_64BIT_REGS (mips_opts.isa)
>
> to decide what size addresses are. That isn't as fine grain as GCC, which
> allows the sizes of the FPRs and GPRs to be selected independently.
Just curious: Who needs to set GPR/FPR sizes explicitly on MIPS?
It's usually a ABI property.
[snip]
> +#define HAVE_32BIT_GPRS \
> + (mips_gp32 || ! ISA_HAS_64BIT_REGS (mips_opts.isa))
> +
> +#define HAVE_32BIT_FPRS \
> + (mips_fp32 || ! ISA_HAS_64BIT_REGS (mips_opts.isa))
> +
> +#define HAVE_64BIT_GPRS (! HAVE_32BIT_GPRS)
> +#define HAVE_64BIT_FPRS (! HAVE_32BIT_FPRS)
> +
> +#define HAVE_32BIT_ADDRESSES \
> + (HAVE_32BIT_GPRS || bfd_arch_bits_per_address (stdoutput) == 32)
How is mips_32bitmode handled WRT this?
[snip]
> @@ -9247,6 +9146,14 @@ md_parse_option (c, arg)
> #endif
> break;
>
> + case OPTION_FP32:
> + mips_fp32 = 1;
> + break;
> +
> + case OPTION_FP64:
> + mips_fp32 = 0;
> + break;
Perhaps there should be some checking for consistency with ABI's
definitions then.
Thiemo
More information about the Binutils
mailing list