#3242 closed defect (fixed)

Workarounds for UT699, UT700, and GR712RC errata

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: tool/gcc Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01751.html

This patch series adds workarounds for the newly discovered errata for UT699, UT700, and GR712RC. The errata and possible workarounds are described in the following documents available at http://www.gaisler.com/index.php/information/app-tech-notes:

GRLIB-TN-0010 - LEON3/FT AHB Deadlock After Sequence of Load and Atomic Instructions
GRLIB-TN-0011 - LEON3/FT AHB Lock Release during Atomic Operation
GRLIB-TN-0012 - GR712RC Incorrect Annulation of Floating-point Operation on Instruction Cache Parity Error
GRLIB-TN-0013 - GRFPU Floating-point controller: Missing FDIV/FSQRT Result

Daniel Cederman (4):

[SPARC] Errata workaround for GRLIB-TN-0012
[SPARC] Errata workaround for GRLIB-TN-0011
[SPARC] Errata workaround for GRLIB-TN-0010
[SPARC] Errata workaround for GRLIB-TN-0013

Attachments (2)

gcc-sparc-ticket-3242.patch (12.7 KB) - added by Sebastian Huber on Nov 30, 2017 at 8:32:21 AM.
gcc-sparc-ticket-3242-v2.patch (13.5 KB) - added by Sebastian Huber on Dec 19, 2017 at 8:36:20 AM.

Download all attachments as: .zip

Change History (7)

comment:1 Changed on Nov 30, 2017 at 8:26:56 AM by Sebastian Huber

Include also:

[SPARC] Recognize the load when accessing the GOT
[SPARC] Prevent -mfix-ut699 from generating b2bst errata sequences

comment:2 Changed on Nov 30, 2017 at 8:31:12 AM by Sebastian Huber

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

	Backport from mainline
	* config/sparc/sparc.c (sparc_do_work_around_errata): Treat the
        movsi_pic_gotdata_op instruction as a load for the UT699 errata
        workaround.

2017-11-29  Martin Aberg  <maberg@gaisler.com>

	Backport from mainline
	* config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
        to prevent b2bst errata sequence.
        (sqrtdf2_fix): Likewise.

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

	Backport from mainline
	* 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.

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

	Backport from mainline
	* config/sparc/sparc.c (atomic_insn_p): New function.
	(sparc_do_work_around_errata): Insert NOP instructions to
	prevent sequences that could trigger the TN-0010 errata for
	UT700.
	* config/sparc/sync.md (atomic_compare_and_swap_leon3_1): Make
	instruction referable in atomic_insns_p.

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

	Backport from mainline
	* config/sparc/sync.md (swapsi): 16-byte align if sparc_fix_gr712rc.
	(atomic_compare_and_swap_leon3_1): Likewise.
	(ldstub): Likewise.

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

	Backport from mainline
	* config/sparc/sparc.c (fpop_insn_p): New function.
	(sparc_do_work_around_errata): Insert NOP instructions to
	prevent sequences that could trigger the TN-0012 errata for
	GR712RC.
	(pass_work_around_errata::gate): Also test sparc_fix_gr712rc.
	* config/sparc/sparc.md (fix_gr712rc): New attribute.
	(in_branch_annul_delay): Prevent floating-point instructions
	in delay slot of annulled integer branch.

Changed on Nov 30, 2017 at 8:32:21 AM by Sebastian Huber

Attachment: gcc-sparc-ticket-3242.patch added

comment:3 Changed on Dec 1, 2017 at 6:02:08 AM by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In ffbd5e9/rtems-source-builder:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems-source-builder.git does not appear to be a Git repository.

comment:4 Changed on Dec 19, 2017 at 8:30:47 AM by Sebastian Huber

Update the patch series to integrate some cleanup and fix an ICE.

2017-12-19  Daniel Cederman  <cederman@gaisler.com>

	Backport from mainline
	2017-12-19  Daniel Cederman  <cederman@gaisler.com>

	* config/sparc/sparc.c (sparc_do_work_around_errata): Make sure
	the jump is to a label.

2017-12-06  Eric Botcazou  <ebotcazou@adacore.com>

	Revert
	2017-11-29  Martin Aberg  <maberg@gaisler.com>

	* config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
	to prevent b2bst errata sequence.
	(sqrtdf2_fix): Likewise.

2017-12-04  Eric Botcazou  <ebotcazou@adacore.com>

	* config/sparc/sparc.c (sparc_do_work_around_errata): Use mem_ref
	instead of MEM_P in a couple more places.  Fix formatting issues.

Changed on Dec 19, 2017 at 8:36:20 AM by Sebastian Huber

comment:5 Changed on Dec 19, 2017 at 9:40:32 AM by Sebastian Huber <sebastian.huber@…>

In f3b1700/rtems-source-builder:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems-source-builder.git does not appear to be a Git repository.
Note: See TracTickets for help on using tickets.