From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1251) id 7C04E3857713; Tue, 25 Apr 2023 11:05:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C04E3857713 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682420753; bh=vkE6AGKdQW+FHd7TYqjC2p9+r8T99O1GVAAUgQeflck=; h=From:To:Subject:Date:From; b=DjM+/8cf+9BAkNyHwfpDcBcRKJWqc2UQ0T9GJV6B/Gac418SYqhy3b7UR3FxJffuP MTpFgS59Y7lQraDRPI68HFToxUn7RQbZXaG+YawJs2+2ou6rLU9xa+eDC8xv+KTYZa Pr1/jdXXbX3v+0BEngt1at5Aj6ZUU619wYNE2RGw= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Roger Sayle To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-216] [Committed] Correct zeroextendqihi2 insn length regression on xstormy16. X-Act-Checkin: gcc X-Git-Author: Roger Sayle X-Git-Refname: refs/heads/master X-Git-Oldrev: 85279b0bddc1c5a7d181e2168e26ded354b21f32 X-Git-Newrev: dee5cef280d6c6da92b56cc0dc2158761c266992 Message-Id: <20230425110553.7C04E3857713@sourceware.org> Date: Tue, 25 Apr 2023 11:05:53 +0000 (GMT) List-Id: https://gcc.gnu.org/g:dee5cef280d6c6da92b56cc0dc2158761c266992 commit r14-216-gdee5cef280d6c6da92b56cc0dc2158761c266992 Author: Roger Sayle Date: Tue Apr 25 12:04:52 2023 +0100 [Committed] Correct zeroextendqihi2 insn length regression on xstormy16. 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. Committed as obvious. 2023-04-25 Roger Sayle gcc/ChangeLog * config/stormy16/stormy16.md (zero_extendqihi2): Restore/fix length attribute for the first (memory operand) alternative. Diff: --- gcc/config/stormy16/stormy16.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/stormy16/stormy16.md b/gcc/config/stormy16/stormy16.md index fd525881881..9d92492c748 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)])])