From patchwork Fri Jan 5 07:19:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Cederman X-Patchwork-Id: 185248 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6069820dyb; Thu, 4 Jan 2024 23:20:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpqJUVgc0uzhTMBYQOYbn6zITp1b1a4zsLI3CdxsKFqT+7GCKgSTSSu2xbxPE2KC1tz1zE X-Received: by 2002:a05:620a:4f:b0:781:e0ea:3108 with SMTP id t15-20020a05620a004f00b00781e0ea3108mr1812119qkt.65.1704439232160; Thu, 04 Jan 2024 23:20:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704439232; cv=pass; d=google.com; s=arc-20160816; b=mAXMk8hI6v48PhocDGVJXqMj900LI5CVNT/yigRW7NyYCUGon2VWIeBlG0eqNrFSKw AtDeCjmI4f/lyymRMeen1unvxZUSC9FRHxoVaWGabJ/h+MRXvIVOAHyDd660O50P3r+G sqOMvOHpjqehfYR8Qq22ayjhmohrERjq3GCtQZ1vJf1IAJJFHGcntJsqYnaJMQX3PlC9 l+4lGRFbn94q1dm9wjoZiBFnxx0da24yKrV8vBL+WCR0a5DqZOhP2ZkCJltkI9ks3DK7 K95KhNBuWgGJ4/bG8gsspFrvigqVEHBlOJqYwk+pfYpK+DwECW55VUdjK1D9LpNqoJJp /Q6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=vKGPyRUo9nnaFl1GbQH6l+xhJgOAzvuHc73v+8vywpA=; fh=fqyohQBeoJkt/+OfqQw34DQ5i67Q9miREpCEh4A0a0g=; b=pChFhkQjG4MwgF4BEw+hTdeQK2ZgmyLOt+CKS6TIf7Hq0MVtfJqBMRpWsrAOMJUGol 8OJs/4DHEmJzZwpMRtGtfyLiJN4NJePyw+T+geoD1xWuLpvEvMEQ6WpDUyAUfIRr42R6 FiKXK12+jg3xqpjxI54wYSLv+KZzfMl3iDv0XJ5npo0sBgfRgfy/dlDmEFV8ISQTDfPr 7PSojTUCqL7+ulVfinyEmk3Ud0LiJmj4+i17BKvGvL1PetQE1BSQEGFUOEEImn/mwRRh CkEq3LAWNPYEhDOobKSZB1TPNmZxR7fDAg9GCMBdag+nChlfuB/CPSQULKoKzrQEaLIb MsRg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gaisler.com header.s=unoeuro header.b=UFSAo4WL; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=gaisler.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id i13-20020a05620a0a0d00b007815e79ec74si1157845qka.367.2024.01.04.23.20.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 23:20:32 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gaisler.com header.s=unoeuro header.b=UFSAo4WL; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=gaisler.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D341C385E02E for ; Fri, 5 Jan 2024 07:20:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out3.simply.com (smtp-out3.simply.com [94.231.106.210]) by sourceware.org (Postfix) with ESMTPS id 5CFFE38582AD for ; Fri, 5 Jan 2024 07:19:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5CFFE38582AD Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=gaisler.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gaisler.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5CFFE38582AD Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=94.231.106.210 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704439180; cv=none; b=vwEl6FFwqGUJwSJKfuHD2nB8LCSIq6xkaDVwqdFOdbd5zj4VvH2T8mkgqHoqnfvQOs1MSfDQvnQ/qFsxOLSNkExj4hACYbTES1JLz64R/s9x1KnzWFLidzdFG333gozxf/hS9ppY0d9VjtalitjbevMDgfDzD83YUZGrLYS/u64= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704439180; c=relaxed/simple; bh=wXvYYdym/XD6DTcHd5aI2s6Qn9jc8FEQfnPPj0Mx3ew=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=d343dzn5bFmeBh7WRngncakullQRDLYWxq09o2TAwtSzqxOyRqCtS1HIWiSgEvIt5m8Ae+zW2nA/xAjNPrOgCXT4BM5XfnTDxWwsN0HNRYIipF4pnrQNnXdtCZfxI2wiVq+vITI2lvOwvnqPh5Tec9kUBt6jOIos+bgboLATCJQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by smtp.simply.com (Simply.com) with ESMTP id 4T5vwT2G1Bz67wm; Fri, 5 Jan 2024 08:19:37 +0100 (CET) Received: from cederman.got.gaisler.com (h-98-128-223-123.NA.cust.bahnhof.se [98.128.223.123]) by smtp.simply.com (Simply.com) with ESMTPA id 4T5vwT0dcTz67wG; Fri, 5 Jan 2024 08:19:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaisler.com; s=unoeuro; t=1704439177; bh=vKGPyRUo9nnaFl1GbQH6l+xhJgOAzvuHc73v+8vywpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UFSAo4WLq3OztHa1ZlleTdLyKd/kzYPHQyo56pKMhrqeKQlQ58NU9IW8yIOTWOMyX 8JdyoRx3bCEFkhZanwLKhz+ifGLEpNpabnDxuilxY30nBCshLyPss5fnALpNrssqwX yh2/lh+xnLfVS7rYM++Ld3Il38OshtPtdEnQ+vp8= From: Daniel Cederman To: gcc-patches@gcc.gnu.org Cc: ebotcazou@libertysurf.fr, daniel@gaisler.com, Andreas Larsson Subject: [PATCH 1/2] sparc: Revert membar optimization that is not suitable for LEON5 Date: Fri, 5 Jan 2024 08:19:11 +0100 Message-Id: <20240105071913.593978-2-cederman@gaisler.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240105071913.593978-1-cederman@gaisler.com> References: <20240105071913.593978-1-cederman@gaisler.com> MIME-Version: 1.0 X-Spam-Status: No, score=-15.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787234072561485017 X-GMAIL-MSGID: 1787234072561485017 From: Andreas Larsson LEON5 has a deeper write-buffer and hence stb is not enough to flush a write out. For compatibility, use the default V8 approach for both LEON3 and LEON5. This reverts commit 49cc765db35a5a21cab2aece27a44983fa70b94b, "sync.md (*membar_storeload_leon3): New insn." gcc/ChangeLog: * config/sparc/sync.md (*membar_storeload_leon3): Remove (*membar_storeload): Enable for LEON --- gcc/config/sparc/sync.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/gcc/config/sparc/sync.md b/gcc/config/sparc/sync.md index 8808ed5bc14e..ac291420b8b9 100644 --- a/gcc/config/sparc/sync.md +++ b/gcc/config/sparc/sync.md @@ -64,19 +64,11 @@ "stbar" [(set_attr "type" "multi")]) -;; For LEON3, STB has the effect of membar #StoreLoad. -(define_insn "*membar_storeload_leon3" - [(set (match_operand:BLK 0 "" "") - (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))] - "TARGET_LEON3" - "stb\t%%g0, [%%sp-1]" - [(set_attr "type" "store")]) - ;; For V8, LDSTUB has the effect of membar #StoreLoad. (define_insn "*membar_storeload" [(set (match_operand:BLK 0 "" "") (unspec:BLK [(match_dup 0) (const_int 2)] UNSPEC_MEMBAR))] - "TARGET_V8 && !TARGET_LEON3" + "TARGET_V8" "ldstub\t[%%sp-1], %%g0" [(set_attr "type" "multi")])