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]

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
optabs.c
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.

	Herman.


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