This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Recent libgcc2 changes broken
On Fri, Jan 07, 2000 at 01:12:11PM -0700, Jeffrey A Law wrote:
> In message <200001072010.PAA22206@mal-ach.watson.ibm.com>you write:
> > I think that the patches from the beginning of December merging in
> > the glibc changes are okay.
> >
> > I am not sure how far back Jeff wants the changes rolled back, but
> > I think that the patch making the names word-size dependent are the key
> > problem. The patch was applied around December 26, although the ChangeLog
> > entry itself is mis-dated December 17.
> I'm not sure either. I'm still trying to figure that out myself.
This patch (untested because I don't have enough bandwidth from home right
now) should restore status quo and allow Michael to restore it in c4x as
well (by -DW_TYPE_SIZE=32 in addition to -DDI=HI etc. in t-c4x), but I'd
like to open the discussion on what libgcc2.c double-word arithmetic is all
about (even e.g. on 64bit archs where compiling most of those routines does
not make any sense to me because that functionality is provided by hardware
already).
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.36 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________
2000-01-07 Jakub Jelinek <jakub@redhat.com>
* libgcc2.c: Revert part of Dec, 17th change.
(W_TYPE_SIZE): Allow this to be defined in platform Makefile
fragments to override default.
--- libgcc2.c.jj Fri Jan 7 22:20:32 2000
+++ libgcc2.c Fri Jan 7 22:23:31 2000
@@ -99,18 +99,10 @@ typedef int QItype __attribute__ ((mod
typedef unsigned int UQItype __attribute__ ((mode (QI)));
typedef int HItype __attribute__ ((mode (HI)));
typedef unsigned int UHItype __attribute__ ((mode (HI)));
-#if UNITS_PER_WORD > 1
-/* These typedefs are usually forbidden on dsp's with UNITS_PER_WORD 1 */
typedef int SItype __attribute__ ((mode (SI)));
typedef unsigned int USItype __attribute__ ((mode (SI)));
-#if UNITS_PER_WORD > 2
-/* These typedefs are usually forbidden on archs with UNITS_PER_WORD 2 */
typedef int DItype __attribute__ ((mode (DI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
-#endif
-#endif
-
-#if BITS_PER_UNIT == 8
typedef float SFtype __attribute__ ((mode (SF)));
typedef float DFtype __attribute__ ((mode (DF)));
@@ -122,28 +114,6 @@ typedef float XFtype __attribute__ ((mo
typedef float TFtype __attribute__ ((mode (TF)));
#endif
-#else /* BITS_PER_UNIT != 8 */
-
-/* On dsp's there are usually qf/hf/tqf modes used instead of the above.
- For now we don't support them in libgcc2.c. */
-
-#undef L_fixdfdi
-#undef L_fixsfdi
-#undef L_fixtfdi
-#undef L_fixunsdfdi
-#undef L_fixunsdfsi
-#undef L_fixunssfdi
-#undef L_fixunssfsi
-#undef L_fixunstfdi
-#undef L_fixunsxfdi
-#undef L_fixunsxfsi
-#undef L_fixxfdi
-#undef L_floatdidf
-#undef L_floatdisf
-#undef L_floatditf
-#undef L_floatdixf
-
-#endif /* BITS_PER_UNIT != 8 */
typedef int word_type __attribute__ ((mode (__word__)));
@@ -161,67 +131,15 @@ typedef int word_type __attribute__ ((mo
#define float bogus_type
#define double bogus_type
-#if UNITS_PER_WORD > 2
+#ifndef W_TYPE_SIZE
#define W_TYPE_SIZE (4 * BITS_PER_UNIT)
+#endif
#define Wtype SItype
#define UWtype USItype
#define HWtype SItype
#define UHWtype USItype
#define DWtype DItype
#define UDWtype UDItype
-#define __NW(a,b) __ ## a ## si ## b
-#define __NDW(a,b) __ ## a ## di ## b
-#elif UNITS_PER_WORD > 1
-#define W_TYPE_SIZE (2 * BITS_PER_UNIT)
-#define Wtype HItype
-#define UWtype UHItype
-#define HWtype HItype
-#define UHWtype UHItype
-#define DWtype SItype
-#define UDWtype USItype
-#define __NW(a,b) __ ## a ## hi ## b
-#define __NDW(a,b) __ ## a ## si ## b
-#else
-#define W_TYPE_SIZE BITS_PER_UNIT
-#define Wtype QItype
-#define UWtype UQItype
-#define HWtype QItype
-#define UHWtype UQItype
-#define DWtype HItype
-#define UDWtype UHItype
-#define __NW(a,b) __ ## a ## qi ## b
-#define __NDW(a,b) __ ## a ## hi ## b
-#endif
-
-#define __muldi3 __NDW(mul,3)
-#define __divdi3 __NDW(div,3)
-#define __udivdi3 __NDW(udiv,3)
-#define __moddi3 __NDW(mod,3)
-#define __umoddi3 __NDW(umod,3)
-#define __negdi2 __NDW(neg,2)
-#define __lshrdi3 __NDW(lshr,3)
-#define __ashldi3 __NDW(ashl,3)
-#define __ashrdi3 __NDW(ashr,3)
-#define __ffsdi2 __NDW(ffs,2)
-#define __cmpdi2 __NDW(cmp,2)
-#define __ucmpdi2 __NDW(ucmp,2)
-#define __udivmoddi4 __NDW(udivmod,4)
-#define __fixunstfdi __NDW(fixunstf,)
-#define __fixtfdi __NDW(fixtf,)
-#define __fixunsxfdi __NDW(fixunsxf,)
-#define __fixxfdi __NDW(fixxf,)
-#define __fixunsdfdi __NDW(fixunsdf,)
-#define __fixdfdi __NDW(fixdf,)
-#define __fixunssfdi __NDW(fixunssf,)
-#define __fixsfdi __NDW(fixsf,)
-#define __floatdixf __NDW(float,xf)
-#define __floatditf __NDW(float,tf)
-#define __floatdidf __NDW(float,df)
-#define __floatdisf __NDW(float,sf)
-#define __fixunsxfsi __NW(fixunsxf,)
-#define __fixunstfsi __NW(fixunstf,)
-#define __fixunsdfsi __NW(fixunsdf,)
-#define __fixunssfsi __NW(fixunssf,)
/* DWstructs are pairs of Wtype values in the order determined by
LIBGCC2_WORDS_BIG_ENDIAN. */