This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: m68k -mcpu32 current CVS crashes
- To: gcc-bugs at gcc dot gnu dot org, Jason Duerstock <jason at rhubarb dot arl dot qwestip dot net>
- Subject: Re: m68k -mcpu32 current CVS crashes
- From: Stephen L Moshier <moshier at mediaone dot net>
- Date: Sat, 3 Mar 2001 10:09:18 -0500 (EST)
- Reply-To: moshier at moshier dot ne dot mediaone dot net
> int f (unsigned int x){ return x/10;}
Please try the patch below.
This was broken on m68k by changing
mulu.l #0xcccccccd,%d0:%d1
into
mulu.l #-858993459,%d0:%d1
which indicates the same 32-bit number. It is possible that some 68k
assemblers might not accept -858993459, but gas seems to and I suggest we
should just try to make it work for the sake of 64/32 bit compatibility.
If necessary we might put back some of the complicated printout
decisions that used to determine the radix and width of the printf
format in final.c or varasm.c.
* config/m68k.c (const_uint32_operand): Accept negative const on 32-bit host.
*** m68k.c 2000/06/06 16:21:41 1.1
--- m68k.c 2001/03/03 14:36:59
*************** const_uint32_operand (op, mode)
*** 3332,3338 ****
return (GET_CODE (op) == CONST_INT
&& (INTVAL (op) >= 0 && INTVAL (op) <= 0xffffffffL));
#else
! return ((GET_CODE (op) == CONST_INT && INTVAL (op) >= 0)
|| (GET_CODE (op) == CONST_DOUBLE && CONST_DOUBLE_HIGH (op) == 0));
#endif
}
--- 3332,3338 ----
return (GET_CODE (op) == CONST_INT
&& (INTVAL (op) >= 0 && INTVAL (op) <= 0xffffffffL));
#else
! return ((GET_CODE (op) == CONST_INT)
|| (GET_CODE (op) == CONST_DOUBLE && CONST_DOUBLE_HIGH (op) == 0));
#endif
}