diff options
author | Daniel Cederman <cederman@gaisler.com> | 2017-11-29 15:37:19 +0000 |
---|---|---|
committer | Daniel Hellstrom <danielh@gcc.gnu.org> | 2017-11-29 16:37:19 +0100 |
commit | 97c30075e88f65351d4140a53a0f9acec76a075a (patch) | |
tree | 545d06bbed1d81221f919c4d58ee659b489724b0 /gcc/lra.c | |
parent | 47c72733ab0cc1ca5b7bb196298ce9ecd91c1896 (diff) | |
download | gcc-97c30075e88f65351d4140a53a0f9acec76a075a.zip gcc-97c30075e88f65351d4140a53a0f9acec76a075a.tar.gz gcc-97c30075e88f65351d4140a53a0f9acec76a075a.tar.bz2 |
[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.
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.
From-SVN: r255237
Diffstat (limited to 'gcc/lra.c')
0 files changed, 0 insertions, 0 deletions