This is the mail archive of the gcc-bugs@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]

Re: libgcc2.h patch breaks c4x target


Hi Michael,

Michael Hayes a écrit :
> 
> The following patch breaks complilation of libgcc2.c for the C4x
> target.  Can you please explain what exactly the problem was
> that required this patch so that we can come up with a compromise.
> 
> Thanks, Michael.
> 
> 2000-09-10  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
> 
>         * libgcc2.h: Use LONG_LONG_TYPE_SIZE instead of MIN_UNITS_PER_WORD
>         to decide whether 64-bit support must be generated.
> 

The problem I had was that the 64-bit operations were not generated.
For the 68hc11, I have the following configuration:

BITS_PER_UNIT = 8
UNITS_PER_WORD = 2
LONG_LONG_TYPE_SIZE = 64

and because UNITS_PER_WORD is not 4, the 64-bit operations were not enabled.

It seems that the c4x is defined with:

BITS_PER_UNIT = 32
UNITS_PER_WORD = 1
LONG_LONG_TYPE_SIZE = 64

I can propose a simple fix (verified on i386 & 68hc11) that fixes the test
to check for UNITS_PER_WORD > 1 in addition to LONG_LONG_TYPE_SIZE > 32.
It should fix your problem.

	Stephane

2000-09-23  Stephane Carrez  <Stephane.Carrez@worldnet.fr>

	* libgcc2.h: When checking LONG_LONG_TYPE_SIZE make sure that
	MIN_UNITS_PER_WORD > 1.
--- ../cygnus/gcc/gcc/libgcc2.h	Sun Sep 10 16:52:09 2000
+++ gcc/gcc/libgcc2.h	Sat Sep 23 01:24:30 2000
@@ -163,7 +163,8 @@
 #define UDWtype	UTItype
 #define __NW(a,b)	__ ## a ## di ## b
 #define __NDW(a,b)	__ ## a ## ti ## b
-#elif MIN_UNITS_PER_WORD > 2 || LONG_LONG_TYPE_SIZE > 32
+#elif MIN_UNITS_PER_WORD > 2 \
+      || (MIN_UNITS_PER_WORD > 1 && LONG_LONG_TYPE_SIZE > 32)
 #define W_TYPE_SIZE (4 * BITS_PER_UNIT)
 #define Wtype	SItype
 #define UWtype	USItype

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