public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Eric Botcazou <ebotcazou@adacore.com>
To: Daniel Cederman <cederman@gaisler.com>
Cc: gcc-patches@gcc.gnu.org, sebastian.huber@embedded-brains.de,
	davem@davemloft.net, daniel@gaisler.com
Subject: Re: [PATCH-v3] [SPARC] Add a workaround for the LEON3FT store-store errata
Date: Thu, 29 Jun 2017 13:05:00 -0000	[thread overview]
Message-ID: <9253669.0heIyC41JS@polaris> (raw)
In-Reply-To: <20170627085530.12596-1-cederman@gaisler.com>

> This patch adds a workaround to the Sparc backend for the LEON3FT
> store-store errata. It is enabled when using the -mfix-ut699,
> -mfix-ut700, or -mfix-gr712rc flag.

Let's forget -mfix-gr712rc for now, -mfix-ut700 is enough I think.

> The workaround inserts NOP instructions to prevent the following two
> instruction sequences from being generated:
> 
> std -> stb/sth/st/std
> stb/sth/st -> any single non-store/load instruction -> stb/sth/st/std
> 
> The __FIX_B2BST define can be used to only enable workarounds in assembly
> code when the flag is used.

I'm not thrilled with this, it's undocumented, the other workaround don't have 
it and I don't think that we really need it.

> See GRLIB-TN-0009, "LEON3FT Stale Cache Entry After Store with Data Tag
> Parity Error", for more information.
> 
> gcc/ChangeLog:
> 
> 2017-06-21  Daniel Cederman  <cederman@gaisler.com>
> 
> 	* config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP
> 	instructions to prevent sequences that can trigger the store-store
> 	errata for certain LEON3FT processors.
> 	(sparc_option_override): -mfix-ut699, -mfix-ut700, and
> 	-mfix-gr712rc enables the errata workaround.
> 	* config/sparc/sparc-c.c (sparc_target_macros): Define __FIX_B2BST
> 	when errata workaround is enabled.
> 	* config/sparc/sparc.md: Prevent stores in delay slot.
> 	* config/sparc/sparc.opt: Add -mfix-ut700 and -mfix-gr712rc flag.
> 	* doc/invoke.texi: Document -mfix-ut700 and -mfix-gr712rc flag.

OK for mainline and 7 branch modulo the above two remarks.

-- 
Eric Botcazou

  reply	other threads:[~2017-06-29 13:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27  8:55 Daniel Cederman
2017-06-29 13:05 ` Eric Botcazou [this message]
2017-06-29 15:16   ` Daniel Cederman
2017-06-29 16:05     ` David Miller
2017-06-30  5:11       ` Sebastian Huber
2017-07-04 13:38         ` Daniel Cederman
2017-07-05  5:37           ` Sebastian Huber
2017-07-07 10:01           ` Eric Botcazou
2017-07-07 11:44             ` Daniel Cederman
2017-07-07 16:04               ` Eric Botcazou
2017-07-10  8:49                 ` Daniel Cederman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9253669.0heIyC41JS@polaris \
    --to=ebotcazou@adacore.com \
    --cc=cederman@gaisler.com \
    --cc=daniel@gaisler.com \
    --cc=davem@davemloft.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=sebastian.huber@embedded-brains.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).