From: Daniel Cederman <cederman@gaisler.com>
To: ebotcazou@adacore.com
Cc: gcc-patches@gcc.gnu.org, sebastian.huber@embedded-brains.de,
davem@davemloft.net, daniel@gaisler.com
Subject: [PATCH] [SPARC] Avoid b2bst errata when using -mfix-ut699
Date: Tue, 11 Jul 2017 09:00:00 -0000 [thread overview]
Message-ID: <20170711090006.5724-1-cederman@gaisler.com> (raw)
The errata fix for the UT699 fdivd and fsqrtd might cause a sequence
that can trigger the b2bst errata. Adding a NOP prevents this.
gcc/ChangeLog:
2017-07-11 Daniel Cederman <cederman@gaisler.com>
* config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
to back store errata sensitive sequence from being generated.
(sqrtdf2_fix): Likewise.
---
gcc/config/sparc/sparc.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index afdc7d1..b154003 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -6171,10 +6171,10 @@ visl")
(div:DF (match_operand:DF 1 "register_operand" "e")
(match_operand:DF 2 "register_operand" "e")))]
"TARGET_FPU && sparc_fix_ut699"
- "fdivd\t%1, %2, %0\n\tstd\t%0, [%%sp-8]"
+ "fdivd\t%1, %2, %0\n\tstd\t%0, [%%sp-8]\n\tnop"
[(set_attr "type" "fpdivd")
(set_attr "fptype" "double")
- (set_attr "length" "2")])
+ (set_attr "length" "3")])
(define_insn "divsf3"
[(set (match_operand:SF 0 "register_operand" "=f")
@@ -6423,10 +6423,10 @@ visl")
[(set (match_operand:DF 0 "register_operand" "=e")
(sqrt:DF (match_operand:DF 1 "register_operand" "e")))]
"TARGET_FPU && sparc_fix_ut699"
- "fsqrtd\t%1, %0\n\tstd\t%0, [%%sp-8]"
+ "fsqrtd\t%1, %0\n\tstd\t%0, [%%sp-8]\n\tnop"
[(set_attr "type" "fpsqrtd")
(set_attr "fptype" "double")
- (set_attr "length" "2")])
+ (set_attr "length" "3")])
(define_insn "sqrtsf2"
[(set (match_operand:SF 0 "register_operand" "=f")
--
2.9.3
next reply other threads:[~2017-07-11 9:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 9:00 Daniel Cederman [this message]
2017-07-16 10:44 ` Eric Botcazou
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=20170711090006.5724-1-cederman@gaisler.com \
--to=cederman@gaisler.com \
--cc=daniel@gaisler.com \
--cc=davem@davemloft.net \
--cc=ebotcazou@adacore.com \
--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).