r255243 - in /branches/gcc-7-branch/gcc: Change...

danielh@gcc.gnu.org danielh@gcc.gnu.org
Wed Nov 29 17:01:00 GMT 2017


Author: danielh
Date: Wed Nov 29 17:01:45 2017
New Revision: 255243

URL: https://gcc.gnu.org/viewcvs?rev=255243&root=gcc&view=rev
Log:
[SPARC] Errata workaround for GRLIB-TN-0013

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 insert NOPs if any of the floating point operations have a dependency
  on the destination register of the first (div/sqrt).

* Not insert NOPs if one of the floating point operations is a (div/sqrt).

* Insert NOPs to prevent (div/sqrt) followed by a branch.

It is applicable to GR712RC, UT700, and UT699.

Backport from mainline
2017-11-29  Daniel Cederman  <cederman@gaisler.com>

gcc/
	* 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_lost_divsqrt.
	(sparc_option_override): Set sparc_fix_lost_divsqrt appropriately.
	* config/sparc/sparc.md (fix_lost_divsqrt): New attribute.
	(in_branch_delay): Prevent div and sqrt in delay slot if
	fix_lost_divsqrt.
	* config/sparc/sparc.opt (sparc_fix_lost_divsqrt): New variable.

Modified:
    branches/gcc-7-branch/gcc/ChangeLog
    branches/gcc-7-branch/gcc/config/sparc/sparc.c
    branches/gcc-7-branch/gcc/config/sparc/sparc.md
    branches/gcc-7-branch/gcc/config/sparc/sparc.opt



More information about the Gcc-cvs mailing list