This is the mail archive of the gcc@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]

Re: m68k bootstrapping broken


Richard Zidlicky <rz@linux-m68k.org> writes:

> here is what the brute force search yields:
>
> - ICE on lshrdi occurs when insn-recog.o is crosscompiled with -O2

I've found the bug: for all CONST_METHODs except MOVQ and MOVL we
don't generate a useful CC, but we don't record this fact.  Could you
please test this patch?

Thanks, Andreas.

2004-01-11  Andreas Schwab  <schwab@suse.de>

	* config/m68k/m68k.c (output_move_const_into_data_reg): Clear cc
	status for CONST_METHODs other than MOVQ and MOVL .

Index: gcc/config/m68k/m68k.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68k/m68k.c,v
retrieving revision 1.122
diff -u -a -p -a -u -p -r1.122 gcc/config/m68k/m68k.c
--- gcc/config/m68k/m68k.c	5 Jan 2004 04:13:49 -0000	1.122
+++ gcc/config/m68k/m68k.c	11 Jan 2004 20:03:39 -0000
@@ -1669,10 +1669,23 @@ m68k_rtx_costs (rtx x, int code, int out
 const char *
 output_move_const_into_data_reg (rtx *operands)
 {
-  int i;
+  HOST_WIDE_INT i;
+  CONST_METHOD m;
 
   i = INTVAL (operands[1]);
-  switch (const_method (operands[1]))
+  m = const_method (operands[1]);
+  switch (m)
+    {
+    case MOVQ:
+    case MOVL:
+      break;
+    default:
+      /* All other methods don't produce a useful cc.  */
+      CC_STATUS_INIT;
+      break;
+    }
+
+  switch (m)
     {
     case MOVQ :
       return "moveq %1,%0";

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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