public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Committed] Correct zeroextendqihi2 insn length regression on xstormy16.
@ 2023-04-25 11:10 Roger Sayle
  2023-04-25 13:56 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Roger Sayle @ 2023-04-25 11:10 UTC (permalink / raw)
  To: 'GCC Patches'; +Cc: 'Jeff Law'

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]


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  <roger@nextmovesoftware.com>

gcc/ChangeLog
	* config/stormy16/stormy16.md (zero_extendqihi2): Restore/fix
	length attribute for the first (memory operand) alternative.


Roger
--


[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 415 bytes --]

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)])])
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Committed] Correct zeroextendqihi2 insn length regression on xstormy16.
  2023-04-25 11:10 [Committed] Correct zeroextendqihi2 insn length regression on xstormy16 Roger Sayle
@ 2023-04-25 13:56 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-04-25 13:56 UTC (permalink / raw)
  To: Roger Sayle, 'GCC Patches'



On 4/25/23 05:10, Roger Sayle wrote:
> 
> 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  <roger@nextmovesoftware.com>
> 
> gcc/ChangeLog
> 	* config/stormy16/stormy16.md (zero_extendqihi2): Restore/fix
> 	length attribute for the first (memory operand) alternative.
Thanks.  xstormy is passing again.
jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-25 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-25 11:10 [Committed] Correct zeroextendqihi2 insn length regression on xstormy16 Roger Sayle
2023-04-25 13:56 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).