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]
Other format: [Raw text]

rs6000 extzvsi pattern breakage


Oh dear, I broke this pattern in one of my commits.  The comment added
explains why.

	* config/rs6000/rs6000.md (extzvsi_internal2): Revert most of
	2002-07-26 change.  Comment.

OK to commit?

Index: rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.204
diff -u -p -r1.204 rs6000.md
--- rs6000.md	19 Aug 2002 16:32:54 -0000	1.204
+++ rs6000.md	5 Sep 2002 12:21:34 -0000
@@ -3880,14 +3880,12 @@
   if (which_alternative == 1)
      return \"#\";
 
-  if ((start > 0 && start + size <= 16) || start >= 16)
+  /* Since we are using the output value, we can't ignore any need for
+     a shift.  The bitfield must end at the LSB.  */
+  if (start >= 16 && start + size == 32)
     {
-      operands[3] = GEN_INT (((1 << (16 - (start & 15)))
-			      - (1 << (16 - (start & 15) - size))));
-      if (start < 16)
-	return \"{andiu.|andis.} %0,%1,%3\";
-      else
-	return \"{andil.|andi.} %0,%1,%3\";
+      operands[3] = GEN_INT ((1 << size) - 1);
+      return \"{andil.|andi.} %0,%1,%3\";
     }
 
   if (start + size >= 32)

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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