This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Re: libgcc2.c/longlong.h
- To: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Subject: [PATCH] Re: libgcc2.c/longlong.h
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 16 Dec 1999 10:54:07 +0100
- Cc: gcc-patches at gcc dot gnu dot org
- References: <14424.34036.923615.893356@ongaonga.elec.canterbury.ac.nz>
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)
___________________________________________________________________