public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [rz@linux-m68k.org: Re: m68k, extendqidi2 problem]
@ 2004-03-17 11:02 Richard Zidlicky
  2004-03-17 12:20 ` Gunther Nikl
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Zidlicky @ 2004-03-17 11:02 UTC (permalink / raw)
  To: Bernardo Innocenti, Jim Wilson, Richard Henderson; +Cc: gcc

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

Hi,

sorry, I messed up something in .muttrc so the appended patch
went out only privately to Richard Henderson. 
Richard Henderson gave it already the blessing so please check
it in.

Richard

2004-03-16 Richard Zidlicky <rz@linux-m68k.org>
	* config/m68k/m68k.md: Avoid generating illegal code in extendqidi2


[-- Attachment #2: Type: message/rfc822, Size: 1715 bytes --]

From: Richard Zidlicky <rz@linux-m68k.org>
To: Richard Henderson <rth@redhat.com>
Subject: Re: m68k, extendqidi2 problem
Date: Mon, 8 Mar 2004 12:38:02 +0100
Message-ID: <20040308113802.GA4125@linux-m68k.org>

On Sat, Mar 06, 2004 at 11:27:07AM -0800, Richard Henderson wrote:
> On Sat, Mar 06, 2004 at 12:21:26AM +0100, Richard Zidlicky wrote:
> > It seems we can keep the constraint as is and make a move.w when
> > %1 is ADDRESS_REG_P...
> 
> That seems ok.

here is the patch

--- gcc-3.4-20040218/gcc/config/m68k/m68k.md.rz-extbdi	2004-03-07 23:08:04.000000000 +0100
+++ gcc-3.4-20040218/gcc/config/m68k/m68k.md	2004-03-07 23:32:21.000000000 +0100
@@ -1455,10 +1455,20 @@
 {
   CC_STATUS_INIT;
   operands[2] = gen_rtx_REG (SImode, REGNO (operands[0]) + 1);
-  if (TARGET_68020 || TARGET_COLDFIRE)
-    return "move%.b %1,%2\;extb%.l %2\;smi %0\;extb%.l %0";
+  if (ADDRESS_REG_P(operands[1]))
+    {
+      if (TARGET_68020 || TARGET_COLDFIRE)
+        return "move%.w %1,%2\;extb%.l %2\;smi %0\;extb%.l %0";
+      else
+        return "move%.w %1,%2\;ext%.w %0\;ext%.l %2\;move%.l %2,%0\;smi %0";
+    }
   else
-    return "move%.b %1,%2\;ext%.w %0\;ext%.l %2\;move%.l %2,%0\;smi %0";
+    {
+      if (TARGET_68020 || TARGET_COLDFIRE)
+        return "move%.b %1,%2\;extb%.l %2\;smi %0\;extb%.l %0";
+      else
+        return "move%.b %1,%2\;ext%.w %0\;ext%.l %2\;move%.l %2,%0\;smi %0";
+    }
 })
 
 (define_insn "extendhidi2"




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

end of thread, other threads:[~2004-03-18 10:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-17 11:02 [rz@linux-m68k.org: Re: m68k, extendqidi2 problem] Richard Zidlicky
2004-03-17 12:20 ` Gunther Nikl
2004-03-17 20:58   ` Jim Wilson
2004-03-17 22:35   ` Richard Zidlicky
2004-03-17 23:22     ` Jim Wilson
2004-03-18 10:47       ` Andreas Schwab
2004-03-18  9:57     ` Gunther Nikl

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