Re: [PATCH v2 4/4] [SPARC] Errata workaround for GRLIB-TN-0013

2017-11-28 Thread Eric Botcazou
> > +(and (eq_attr "fix_lost_divsqrt" "true") > > + (eq_attr "type" "fpdivs,fpsqrts,fpdivd,fpsqrtd")) > > + (const_string "false") > > These lines should also be added to the in_integer_branch_annul_delay > attribute. Let's not though and make the modification I suggested instead

Re: [PATCH v2 4/4] [SPARC] Errata workaround for GRLIB-TN-0013

2017-11-28 Thread Eric Botcazou
> 2017-11-17 Daniel Cederman > > * 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 p

Re: [PATCH v2 4/4] [SPARC] Errata workaround for GRLIB-TN-0013

2017-11-27 Thread Daniel Cederman
+(and (eq_attr "fix_lost_divsqrt" "true") + (eq_attr "type" "fpdivs,fpsqrts,fpdivd,fpsqrtd")) + (const_string "false") These lines should also be added to the in_integer_branch_annul_delay attribute. /Daniel C

[PATCH v2 4/4] [SPARC] Errata workaround for GRLIB-TN-0013

2017-11-27 Thread Daniel Cederman
This patch provides a workaround for the errata described in GRLIB-TN-0013. If the workaround is enabled it will: * Prevent div and sqrt instructions in the delay slot. * Insert NOPs to prevent the sequence (div/sqrt) -> (two or three floating point operations or loads) -> (div/sqrt). * Not i