From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5884 invoked by alias); 28 Nov 2017 09:57:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 5059 invoked by uid 89); 28 Nov 2017 09:57:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_BRBL_LASTEXT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=barely X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Nov 2017 09:57:12 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 50DF581395; Tue, 28 Nov 2017 10:57:10 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TtlBEyN1D2BU; Tue, 28 Nov 2017 10:57:10 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id D468681392; Tue, 28 Nov 2017 10:57:09 +0100 (CET) From: Eric Botcazou To: Daniel Cederman Cc: gcc-patches@gcc.gnu.org, sebastian.huber@embedded-brains.de, daniel@gaisler.com Subject: Re: [PATCH v2 1/4] [SPARC] Errata workaround for GRLIB-TN-0012 Date: Tue, 28 Nov 2017 10:01:00 -0000 Message-ID: <5092570.DRgg0bM8L3@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-53-desktop; KDE/4.14.9; x86_64; ; ) In-Reply-To: <20171127095715.5938-2-cederman@gaisler.com> References: <20171127095715.5938-1-cederman@gaisler.com> <20171127095715.5938-2-cederman@gaisler.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2017-11/txt/msg02380.txt.bz2 > 2017-11-17 Daniel Cederman > > * 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. Sorry, I should have been more explicit in my first reply, because: > @@ -590,6 +594,26 @@ > (const_string "true") > ] (const_string "false"))) > > +(define_attr "in_integer_branch_annul_delay" "false,true" > + (cond [(eq_attr "type" > "uncond_branch,branch,cbcond,uncond_cbcond,call,sibcall,call_no_delay_slot, > multi") + (const_string "false") > + (and (eq_attr "fix_gr712rc" "true") > + (eq_attr "type" "fp,fpcmp,fpmove,fpcmove,fpmul, > + fpdivs,fpsqrts,fpdivd,fpsqrtd")) > + (const_string "false") > + (and (eq_attr "fix_b2bst" "true") (eq_attr "type" "store,fpstore")) > + (const_string "false") > + (and (eq_attr "fix_ut699" "true") (eq_attr "type" "load,sload")) > + (const_string "false") > + (and (eq_attr "fix_ut699" "true") > + (and (eq_attr "type" "fpload,fp,fpmove,fpmul,fpdivs,fpsqrts") > + (ior (eq_attr "fptype" "single") > + (eq_attr "fptype_ut699" "single")))) > + (const_string "false") > + (eq_attr "length" "1") > + (const_string "true") > + ] (const_string "false"))) > + > (define_delay (eq_attr "type" "call") > [(eq_attr "in_call_delay" "true") (nil) (nil)]) is barely maintainable. So let's go back to the original version and... > @@ -602,6 +626,10 @@ > (define_delay (eq_attr "type" "branch") > [(eq_attr "in_branch_delay" "true") (nil) (eq_attr "in_branch_delay" > "true")]) > > +(define_delay (and (eq_attr "type" "branch") (eq_attr "branch_type" "icc")) > + [(eq_attr "in_branch_delay" "true") (nil) > + (eq_attr "in_integer_branch_annul_delay" "true")]) > + > (define_delay (eq_attr "type" "uncond_branch") > [(eq_attr "in_branch_delay" "true") (nil) (nil)]) ...add (and (.) (not (eq_attr "branch_type" "icc")) to the first define_delay. -- Eric Botcazou