This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: m68k bootstrapping broken
Andreas Schwab <schwab@suse.de> writes:
> 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?
I checked again, SWAP will also produce a correct cc, here is an
updated patch.
Andreas.
2004-01-11 Andreas Schwab <schwab@suse.de>
* config/m68k/m68k.c (output_move_const_into_data_reg): Clear cc
status for NOTB/NOTW/NEGW methods.
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:21:56 -0000
@@ -1677,12 +1677,15 @@ output_move_const_into_data_reg (rtx *op
case MOVQ :
return "moveq %1,%0";
case NOTB :
+ CC_STATUS_INIT;
operands[1] = GEN_INT (i ^ 0xff);
return "moveq %1,%0\n\tnot%.b %0";
case NOTW :
+ CC_STATUS_INIT;
operands[1] = GEN_INT (i ^ 0xffff);
return "moveq %1,%0\n\tnot%.w %0";
case NEGW :
+ CC_STATUS_INIT;
return "moveq %#-128,%0\n\tneg%.w %0";
case SWAP :
{
--
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."