This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH m68k fix for long long shift by 16


Hi,

I just came across a problem with right shift of long long by 16.
This patch should fix it.


2001-06-09  Peter Jakubek <pjak@snafu.de>

	* config/m68k/m68k.md (ashrdi_const): Fix right shift by 16.

diff -ru src.orig/gcc/config/m68k/m68k.md src/gcc/config/m68k/m68k.md
--- src.orig/gcc/config/m68k/m68k.md	Tue Apr 03 17:05:52 2001
+++ src/gcc/config/m68k/m68k.md	Sat Jun 09 17:13:55 2001
@@ -4805,7 +4805,7 @@
   else if (INTVAL (operands[2]) == 8)
     return \"move%.b %0,%1\;asr%.l %#8,%0\;ror%.l %#8,%1\";
   else if (INTVAL (operands[2]) == 16)
-    return \"move%.w %0,%1\;clr%.w %0\;swap %1\;ext%.l %0\";
+    return \"move%.w %0,%1\;swap %0\;ext%.l %0\;swap %1\";
   else if (INTVAL (operands[2]) == 48)
     return \"swap %0\;ext%.l %0\;move%.l %0,%1\;smi %0\;ext%.w %0\";
   else if (INTVAL (operands[2]) == 31)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]