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: [PATCH 2/4] x86: suppress pointless f<op>p warnings


On Wed, Mar 7, 2018 at 1:48 AM, Jan Beulich <JBeulich@suse.com> wrote:
> It is pointless to warn about reversed operands when both name the same
> register (granted that encoding is of little use, but anyway).
>
> gas/
> 2018-03-07  Jan Beulich  <jbeulich@suse.com>
>
>         * config/tc-i386.c (process_operands): Add accumulator check to
>         "Ugh" warning check.
>         * testsuite/gas/i386/fsubp.l: Drop warning expectations.
>
> --- a/gas/config/tc-i386.c
> +++ b/gas/config/tc-i386.c
> @@ -6494,14 +6494,14 @@ duplicate:
>             {
>               /* Warn about some common errors, but press on regardless.
>                  The first case can be generated by gcc (<= 2.8.1).  */
> -             if (i.operands == 2)
> +             if (i.operands == 2 && !i.op[0].regs->reg_type.bitfield.acc)
>                 {
>                   /* Reversed arguments on faddp, fsubp, etc.  */
>                   as_warn (_("translating to `%s %s%s,%s%s'"), i.tm.name,
>                            register_prefix, i.op[!intel_syntax].regs->reg_name,
>                            register_prefix, i.op[intel_syntax].regs->reg_name);
>                 }
> -             else
> +             else if (i.operands == 1)
>                 {
>                   /* Extraneous `l' suffix on fp insn.  */
>                   as_warn (_("translating to `%s %s%s'"), i.tm.name,

Can we simply drop this encoding altogether?


-- 
H.J.


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