From patchwork Tue Apr 25 11:10:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Sayle X-Patchwork-Id: 1773370 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nextmovesoftware.com header.i=@nextmovesoftware.com header.a=rsa-sha256 header.s=default header.b=SAihZPcu; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q5K791cGYz23v2 for ; Tue, 25 Apr 2023 21:10:59 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A479F3858C20 for ; Tue, 25 Apr 2023 11:10:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from server.nextmovesoftware.com (server.nextmovesoftware.com [162.254.253.69]) by sourceware.org (Postfix) with ESMTPS id 4983B3858D1E for ; Tue, 25 Apr 2023 11:10:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4983B3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nextmovesoftware.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nextmovesoftware.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nextmovesoftware.com; s=default; h=Content-Type:MIME-Version:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yOlCCcUuDhDqRn4MQCzKoWAtFWqlbWrtuXD7KXrHPsk=; b=SAihZPcukWR8XKMN+2EKqjwG8d HXVaZT4VmbJplbW9FoOGlac2ANaUyUCdgjaS1tF2y7CAxx2HuVuIr7InHuT5A8/zT9P1lJL8odcMG LwU+EuLXV3sPg4dG7zwJ+602aScNFKjTbr9oIAvYe1tYrzuAN3SY0ZxAm1h4gyr2m/Wbjh5MKNvXM gjhtv3mSRRFEAVNUB2BseSRn7S+z/V0t/ZXDms+kwaPV4gszpHBmE36e1fwA6d4J2oSMMUFuteXAx q/Xe/+p2n/xkUniB4BnmyPlGz54eIS76RpCVRek7zOOVV3SER3DgNBrvDTNPk+hVbigH4itrdm+IX QWljaOeQ==; Received: from [185.62.158.67] (port=58224 helo=Dell) by server.nextmovesoftware.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1prGZI-000232-14; Tue, 25 Apr 2023 07:10:44 -0400 From: "Roger Sayle" To: "'GCC Patches'" Cc: "'Jeff Law'" Subject: [Committed] Correct zeroextendqihi2 insn length regression on xstormy16. Date: Tue, 25 Apr 2023 12:10:44 +0100 Message-ID: <00c101d97766$95a30a40$c0e91ec0$@nextmovesoftware.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: Adl3ZiVTlCGBBG7tQwGEBVWXTI4H8A== Content-Language: en-gb X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.nextmovesoftware.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nextmovesoftware.com X-Get-Message-Sender-Via: server.nextmovesoftware.com: authenticated_id: roger@nextmovesoftware.com X-Authenticated-Sender: server.nextmovesoftware.com: roger@nextmovesoftware.com X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" My recent tweak to the zeroextendqihi2 pattern on xstormy16 incorrectly handled the case where the operand was a MEM. MEM operands use a longer encoding than REG operands, and the incorrect instruction length resulted in assembler errors (as reported by Jeff Law). This patch restores the original length resolving this regression. Sorry for the inconvenience. Committed as obvious, after testing that a cross-compiler to xstormy16-elf builds from x86_64-pc-linux-gnu, and that gcc.c-torture/execute/memset-2.c no longer causes "operand out of range" issues in gas. Sorry again. 2023-04-25 Roger Sayle gcc/ChangeLog * config/stormy16/stormy16.md (zero_extendqihi2): Restore/fix length attribute for the first (memory operand) alternative. Roger diff --git a/gcc/config/stormy16/stormy16.md b/gcc/config/stormy16/stormy16.md index fd52588..9d92492 100644 --- a/gcc/config/stormy16/stormy16.md +++ b/gcc/config/stormy16/stormy16.md @@ -286,7 +286,7 @@ shl %0,#8 | shr %0,#8" [(set_attr "psw_operand" "nop,nop,0") (set_attr_alternative "length" - [(const_int 2) + [(const_int 4) (const_int 2) (const_int 4)])])