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]

[PATCH] Re: libgcc2.c/longlong.h


On Thu, Dec 16, 1999 at 07:24:20PM +1300, Michael Hayes wrote:
> 
> The recent changes to libgcc2.c and longlong.h has broken targets
> where BITS_PER_UNIT is not 8 (eg. C4x).
> 
> We end up with a test like the following in longlong.h that causes a
> parse error.
> 
> #if (sizeof(int) * BITS_PER_UNIT) == 32
> 

Sorry, thinko on my part.
This patch should fix it. As I was not much familiar with BITS_PER_UNIT != 8
archs, I've built cross compilers for all of them to check it.

1999-12-16  Jakub Jelinek  <jakub@redhat.com>

	* libgcc2.c (SI_TYPE_SIZE): Fix for machines where SI_TYPE_SIZE != 8.

--- gcc/libgcc2.c.jj	Thu Dec  9 09:11:05 1999
+++ gcc/libgcc2.c	Thu Dec 16 10:32:50 1999
@@ -127,11 +127,7 @@ typedef int word_type __attribute__ ((mo
 #define float bogus_type
 #define double bogus_type
 
-#if BITS_PER_UNIT == 8
-#define SI_TYPE_SIZE 32
-#else
-#define SI_TYPE_SIZE (sizeof (SItype) * BITS_PER_UNIT)
-#endif
+#define SI_TYPE_SIZE (4 * BITS_PER_UNIT)
 #define W_TYPE_SIZE SI_TYPE_SIZE
 #define UWtype	USItype
 #define UHWtype	USItype


Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.26 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________


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