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: 87361 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3325461vqo; Tue, 25 Apr 2023 04:11:16 -0700 (PDT) X-Google-Smtp-Source: AKy350aTQ0xb8+mb+rBne2MPBrmcx9t6tTAOC6YyEurrTIdHhSqxl3Fd8b76ICIHW62eQkPJnw1F X-Received: by 2002:a17:907:90d5:b0:94f:1a23:2f1b with SMTP id gk21-20020a17090790d500b0094f1a232f1bmr9916235ejb.24.1682421076132; Tue, 25 Apr 2023 04:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682421076; cv=none; d=google.com; s=arc-20160816; b=HFDmhDE82ij/0kDcn23W83FCcaEuBRtYXhfjTQyYvFXR4hWnzqfcfdlrvkz8Ndl1Lx 9dUWLXdF1dTwufjSjlaxsxI/aQ23ZUmqDG0+krdWimGLZjob+CLm55zqRditfmshqDlS 4HfTKd4PEkOt2+tOBdnkzKvet0uXvZM0wkxUpQP3thCpF8vhA1Zur9d9CiLa2CR+iF5L DTaRUjw5sRCAslYHjAgLPWmILYF4KYm6mNV0na6lhEXca52jWZv9ar7xDKABu4pzjx6Y jtWVs6Z25rb4EjuBvUGRRFrIhlPZih/l+EZK6B+GNuyAMRyq/XROPOvVTPdIHHy9BYkc iTUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-language:thread-index :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dmarc-filter:delivered-to; bh=yOlCCcUuDhDqRn4MQCzKoWAtFWqlbWrtuXD7KXrHPsk=; b=iYxHSlB+LXiKxEL9qU4dL89f/oiqoNbIRQBL1MdLXzlCIVGKmVxkuvCtOcqoDS8a9A 3y7vZfGLKX6SMDdfS5A6uGE6tYj5onYMXZu4fIK2DC0IGzqTXkMZGuXseJcVea/GrS6L AN1/FUWrhJho5ZgSjPecePutP89IqVw7HqO3wc23hR8flGHo8nyXu0TuLX1+siJABwWS Ge/27UQw/vhC/nVCMgTb2cXm3/l0wF9eMMod1iIjIHXm6qn9+zCYwxvlw6U2z8KClV0K 7ATTIcrMyEQdCIlHXYCEhZQs8kXChby71M/4mibfG6S4SOdThQ2iwaInktJ5vyB8wnTh EWXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nextmovesoftware.com header.s=default header.b=SAihZPcu; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id qf38-20020a1709077f2600b0095730af7355si8387371ejc.43.2023.04.25.04.11.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 04:11:16 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=fail header.i=@nextmovesoftware.com header.s=default header.b=SAihZPcu; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ADA0C385828D for ; Tue, 25 Apr 2023 11:11:10 +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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764146362316120069?= X-GMAIL-MSGID: =?utf-8?q?1764146362316120069?= 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)])])