This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCHv4] Add support for O32 FPXX ABI


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]