> 2017-11-17  Daniel Cederman  <ceder...@gaisler.com>
> 
>       * config/sparc/sparc.c (fpop_reg_depend_p): New function.
>       (div_sqrt_insn_p): New function.
>       (sparc_do_work_around_errata): Insert NOP instructions to
>       prevent sequences that could trigger the TN-0013 errata for
>       certain LEON3 processors.
>       (pass_work_around_errata::gate): Also test sparc_fix_tn0013.
>       (sparc_option_override): Set sparc_fix_tn0013 appropriately.
>       * config/sparc/sparc.md (fix_tn0013): New attribute.
>       (in_branch_delay): Prevent div and sqrt in delay slot if fix_tn0013.
>       * config/sparc/sparc.opt (sparc_fix_tn0013: New variable.

OK for mainline and 7 branch modulo:

> +           /* Check if this is a problematic sequence.  */
> +           if (i > 1
> +               && fp_found >= 2
> +               && div_sqrt_insn_p (after))
> +             {
> +               /* If is this is the short version of the problematic
> +                  sequence we add two NOPs in a row to also prevent
> +                  the long version.  */
> +               if (i == 2)
> +                 emit_insn_before (gen_nop (), next);
> +               insert_nop = true;
> +               break;
> +             }

Superfluous "is".

-- 
Eric Botcazou

Reply via email to