This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCHv4] Add support for O32 FPXX ABI
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Cc: "binutils\ at sourceware dot org" <binutils at sourceware dot org>, "Moore\, Catherine" <Catherine_Moore at mentor dot com>, "macro\ at codesourcery dot com" <macro at codesourcery dot com>, "Joseph Myers \(joseph\ at codesourcery dot com\)" <joseph at codesourcery dot com>
- Date: Sun, 27 Jul 2014 10:17:21 +0100
- Subject: Re: [PATCHv4] Add support for O32 FPXX ABI
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B0235320EB4042 at LEMAIL01 dot le dot imgtec dot org>
Matthew Fortune <Matthew.Fortune@imgtec.com> writes:
> @@ -258,6 +258,10 @@ struct mips_set_options
> Changed by .set singlefloat or .set doublefloat, command-line options
> -msingle-float or -mdouble-float. The default is false. */
> bfd_boolean single_float;
> +
> + /* 1 if single-precision operations on odd-numbered registers are
> + not allowed (even if supported by ISA_HAS_ODD_SINGLE_FPR). */
> + int nooddspreg;
> };
I think "oddspreg" would be better, partly for consistency with the
ISA_HAS_* macro and partly to avoid the double negative in things like:
bfd_boolean oddspreg = (ISA_HAS_ODD_SINGLE_FPR (mips_opts.isa, mips_opts.arch)
|| FPR_SIZE == 64)
&& !mips_opts.nooddspreg;
> - /* Single-precision coprocessor loads and moves are OK too. */
> + /* Single-precision coprocessor loads and moves are OK for 32-bit registers,
> + otherwise it depends on oddspreg. */
> if ((insn->pinfo & FP_S)
> - && (insn->pinfo & (INSN_COPROC_MEMORY_DELAY | INSN_STORE_MEMORY
> - | INSN_LOAD_COPROC_DELAY | INSN_COPROC_MOVE_DELAY)))
> + && (insn->pinfo & INSN_FP_32_MOVE))
> + return FPR_SIZE == 32 || oddspreg;
Why do you need a new flag for this?
> @@ -18643,7 +18687,16 @@ md_mips_end (void)
> file_mips_check_options ();
>
> /* Set a floating-point ABI if the user did not. */
> - if (!obj_elf_seen_attribute (OBJ_ATTR_GNU, Tag_GNU_MIPS_ABI_FP))
> + if (obj_elf_seen_attribute (OBJ_ATTR_GNU, Tag_GNU_MIPS_ABI_FP))
> + {
> +
> + /* Perform consistency checks on the floating-point ABI. */
Excess blank line.
Looks good otherwise, thanks.
Richard