From patchwork Tue Jul 11 09:00:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Cederman X-Patchwork-Id: 786515 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x6GK05WDlz9s7g for ; Tue, 11 Jul 2017 19:01:08 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="CNzpX7I/"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=rXCaPPVxHYMV FCG0hmVcvRL/Kfu9A9woFJJ966E5YXdaMr2KQB7NY5JKSRwIYwebtfcj3llacP1I BUUBgBZ64n7tjEfjB79UXrJEwEtjYM4Ly+wqEsHSddEi3qjo42p4P+lsDTRchEvg ap3JaYGcrGbq8tnvPsGcK/YaBdoMvfc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=2CzNECVkg4cZ7QaEPN ZjuWdqaNw=; b=CNzpX7I/S2qCl84vnwrO56GNRFu5pYY+7jx+GU6Y3Jnv3vtGfJ hTVnsxheWrMOO4NIARgSjrPC3KAQfhxYicrQhr5V/J8ujrngWD8PzIVPBD1Y0+X5 Q8MjL2qpd2Di5R4i/e8BinJF+TPXN4/qgoMFhtvfva+FNenT5Aw3cNs/M= Received: (qmail 109941 invoked by alias); 11 Jul 2017 09:00:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 109675 invoked by uid 89); 11 Jul 2017 09:00:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:ESMTPA X-HELO: bin-vsp-out-02.atm.binero.net Received: from bin-mail-out-05.binero.net (HELO bin-vsp-out-02.atm.binero.net) (195.74.38.228) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Jul 2017 09:00:32 +0000 X-Halon-ID: 550a2b35-6617-11e7-ba97-005056917f90 Authorized-sender: cederman@gaisler.com Received: from localhost.localdomain (unknown [81.170.187.120]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id 550a2b35-6617-11e7-ba97-005056917f90; Tue, 11 Jul 2017 11:00:08 +0200 (CEST) From: Daniel Cederman 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 11:00:06 +0200 Message-Id: <20170711090006.5724-1-cederman@gaisler.com> X-IsSubscribed: yes 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 * 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")