From patchwork Fri Jan 5 07:19:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Cederman X-Patchwork-Id: 185249 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6069867dyb; Thu, 4 Jan 2024 23:20:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHAtZkiC07BEs3/VYbwL/a5u6u19yR/kn548H8ZUwSGTLEklrNiPC8a7qd2Uac+LowksaU4 X-Received: by 2002:ac8:5714:0:b0:429:7bd8:9e91 with SMTP id 20-20020ac85714000000b004297bd89e91mr9041qtw.57.1704439240319; Thu, 04 Jan 2024 23:20:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704439240; cv=pass; d=google.com; s=arc-20160816; b=xsECh7jJFE3IyRMVnJOr/bi6Ey76tCMvqTedqE40rhYPfakrUYbOqoWbVmgc5Fvvhg 3QdcZvemk3F2RRcqauRRKM0k3JCXGRF7EQ9DrgqydHdoe1NHTjfgAjE9jdLrBLFZ/tWy gw+CtlV9l5YOMcQbEy9iOlrLUAMdQqacpkUH99qA8KJG/EkiNcI4K8DTvqKMxKPLoyTM zekSmM5laHawdkgUJkaASyh3MCCOY7GIt/7UnuhTCcss1SdBfMLOQN/z/ayJ+YQkasZw dsaNnHS32tkcB/LONrzyPIR5rL6DyYzManMYBJS5PGeFy8rrnhx7yTAh9dTox2HM3Pd5 vIUA== 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=eZyIVbL7je0waajhelTyLjArI93MZRngEgsHCNWhswQ=; fh=rIObTAxIziLroRYYyAaA4FmRqLBS8lo6qLKQtV3fxpU=; b=vtiQr7CRBt85dHzluR0vG+JGsNG+K52Ho9aJHJ+lpqxP7pKdshcHkHhRByjtdzBurN wLKcllqEz3TKv5AN6ez3/igw2O1YkSjEgVekUTnTwUk8147O1IqrMOWM3vCJMkPWuWz7 RQu/THTE41eXvqJHvNiazZlziCPnc9K2fZ2Z/KoPn8KRn/CVtRXUMW/6QrI9IOUhUH9i bws6JvQVDn+VE3diFiUKsw8xoFcDGhDmaz+sQAhi5tNQXY6PVywPsFrLSgv95Qtqg3ui YZ4NL7mYNgXv9oU07oR4i130PAqGIbN2iID4NwXWtuVsIdZspiu6y/FmjIF5+lEYyzPC 3dxw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gaisler.com header.s=unoeuro header.b="b/4UkXtT"; 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 f19-20020a05622a105300b004282c55a880si1210473qte.786.2024.01.04.23.20.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 23:20:40 -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="b/4UkXtT"; 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 00E62385DC02 for ; Fri, 5 Jan 2024 07:20:40 +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 622D8385801D for ; Fri, 5 Jan 2024 07:19:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 622D8385801D 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 622D8385801D 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=1704439181; cv=none; b=UeX/8ClSicpxDKlCwjAtgOE81QRaqq1hSV1grIEPnSIvU7QQnXtd+rivzA+fxr3w4doA3QMWI5Uc4ZJIIoOWbyUam2eYILAf1nCSoak1Q6LxTroIYeVqAqf4wQyNOaDyFkZGU4faGOudPXqtOStqN6febZztSzbxh6Dj0ohosbc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704439181; c=relaxed/simple; bh=okYw4pGPntzD+MGvb3hovWaTQbvauYY/MxhRNoI8Glo=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=i53teOQyGe+8DJ5peYebOb8v4G2hMDOhk3I5ivGErEu6VtO1koBFSyLsJRHCBjM2qZsqQzxvgTW1wTwkVhnkilIgh7qB+vFkeAeQ1SHn+fMYrUqAF+VvcRG0Cp/bx0xQ3lZvoHB2MS2sOZIN5DD5Ro/WahuOM3H8Sw2BMiP2umE= 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 4T5vwT3dbnz67x1; 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 4T5vwT202fz67qq; 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=eZyIVbL7je0waajhelTyLjArI93MZRngEgsHCNWhswQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=b/4UkXtTHlss2D1kEESy7jETwiAfyLuFNM/e9JRgxPpADFpq5rHa8TUv+1uBpciRe awm6L4ACJ4wUjldzc+tT0f/iVnvoglUVIBciHPv3uSV1qrD/3TuCbwE+lvvLF4ynGF 4sjLRkoJbF9R4XrkKxWwfZyi0niypjQaKTqCyc2I= From: Daniel Cederman To: gcc-patches@gcc.gnu.org Cc: ebotcazou@libertysurf.fr, daniel@gaisler.com Subject: [PATCH] sparc: Treat instructions with length 0 as empty Date: Fri, 5 Jan 2024 08:19:12 +0100 Message-Id: <20240105071913.593978-3-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=-14.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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: 1787234081101360248 X-GMAIL-MSGID: 1787234081101360248 This is to handle the membar_empty instruction that can be generated when compiling for UT699. gcc/ChangeLog: * config/sparc/sparc.cc (next_active_non_empty_insn): Length 0 treated as empty --- gcc/config/sparc/sparc.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/config/sparc/sparc.cc b/gcc/config/sparc/sparc.cc index 62c57cc53159..8970674004b3 100644 --- a/gcc/config/sparc/sparc.cc +++ b/gcc/config/sparc/sparc.cc @@ -1119,6 +1119,7 @@ next_active_non_empty_insn (rtx_insn *insn) while (insn && (GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE || GET_CODE (PATTERN (insn)) == ASM_INPUT + || (get_attr_length (insn) == 0) || (USEFUL_INSN_P (insn) && (asm_noperands (PATTERN (insn)) >= 0) && !strcmp (decode_asm_operands (PATTERN (insn),