From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00C2_01D9776E.F7677240" 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 List-Id: This is a multipart message in MIME format. ------=_NextPart_000_00C2_01D9776E.F7677240 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 -- ------=_NextPart_000_00C2_01D9776E.F7677240 Content-Type: text/plain; name="patch.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patch.txt" diff --git a/gcc/config/stormy16/stormy16.md = b/gcc/config/stormy16/stormy16.md=0A= index fd52588..9d92492 100644=0A= --- a/gcc/config/stormy16/stormy16.md=0A= +++ b/gcc/config/stormy16/stormy16.md=0A= @@ -286,7 +286,7 @@=0A= shl %0,#8 | shr %0,#8"=0A= [(set_attr "psw_operand" "nop,nop,0")=0A= (set_attr_alternative "length"=0A= - [(const_int 2)=0A= + [(const_int 4)=0A= (const_int 2)=0A= (const_int 4)])])=0A= =0A= ------=_NextPart_000_00C2_01D9776E.F7677240--