This is the mail archive of the
mailing list for the GCC project.
Re: patch libgcc2.c for c4x target
- From: hermantenbrugge at home dot nl (Herman ten Brugge)
- To: rth at redhat dot com (Richard Henderson)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 6 Feb 2003 21:35:35 +0100 (CET)
- Subject: Re: patch libgcc2.c for c4x target
Richard Henderson wrote :
> On Wed, Feb 05, 2003 at 08:57:54PM +0100, Herman ten Brugge wrote:
> > * libgcc2.c: (__clzsi2, __clzdi2, __ctzsi2, __ctzdi2, __popcountsi2,
> > __popcountdi2, __paritysi2, __paritydi2) Use UWtype and UDWtype type
> > instead of USItype and UDItype.
> This is incorrect. We need these to be 32-bit quantities
> for 64-bit targets too. A bit of asymmetry from the rest
> of libgcc, but...
I just checked optabs.c and saw the SImode/DImode code. I agree the
patch is not correct without a change to this code as well.
The QImode on the c4x target is 32 bits so I see no problem in
changing the SImode into mode_for_size (INT_TYPE_SIZE, MODE_INT, 0)
and DImode into mode_for_size (LONG_LONG_TYPE_SIZE, MODE_INT, 0) in
Making this change to optabs.c and the suggested patch to libgcc2.c
should work for all targets.
> I thought I'd gotten L_clzsi2 et all undefined for c4x.
> What went wrong with that?
If you can not live with the change suggested above can you remember how
you prevented this error for the c4x target.