This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: problem with BImode and BITS_PER_UNIT != 8 (again)
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: problem with BImode and BITS_PER_UNIT != 8 (again)
- From: Herman ten Brugge <Haj dot Ten dot Brugge at net dot HCC dot nl>
- Date: Tue, 26 Sep 2000 22:22:39 +0100 (WEST)
Hello,
I found second problem for the c4x target. The mode_mask_array was
also not calculated correctly. I used the same code as the previous
patch to fix this problem also. The previous patch is also included
in this patch.
Herman.
2000-10-26 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
* rtl.c: Modify calculation of mode_bitsize array when
BITS_PER_UNIT != 8.
--- rtl.c.org Tue Sep 26 22:15:14 2000
+++ rtl.c Tue Sep 26 22:17:55 2000
@@ -152,7 +152,8 @@ const enum mode_class mode_class[(int) M
/* Indexed by machine mode, gives the length of the mode, in bits.
GET_MODE_BITSIZE uses this. */
-#define DEF_MACHMODE(SYM, NAME, CLASS, BITSIZE, SIZE, UNIT, WIDER) BITSIZE,
+#define DEF_MACHMODE(SYM, NAME, CLASS, BITSIZE, SIZE, UNIT, WIDER) \
+ BITSIZE <= 1 ? BITSIZE : BITSIZE * (BITS_PER_UNIT / 8),
const unsigned int mode_bitsize[(int) MAX_MACHINE_MODE] = {
#include "machmode.def"
@@ -196,7 +197,11 @@ const unsigned char mode_wider_mode[(int
#undef DEF_MACHMODE
#define DEF_MACHMODE(SYM, NAME, CLASS, BITSIZE, SIZE, UNIT, WIDER) \
- ((BITSIZE) >= HOST_BITS_PER_WIDE_INT) ? ~(unsigned HOST_WIDE_INT)0 : ((unsigned HOST_WIDE_INT) 1 << (BITSIZE)) - 1,
+ ((BITSIZE <= 1 ? BITSIZE : BITSIZE * (BITS_PER_UNIT / 8)) >= \
+ HOST_BITS_PER_WIDE_INT) \
+ ? ~(unsigned HOST_WIDE_INT)0 \
+ : ((unsigned HOST_WIDE_INT) 1 << \
+ (BITSIZE <= 1 ? BITSIZE : BITSIZE * (BITS_PER_UNIT / 8))) - 1,
/* Indexed by machine mode, gives mask of significant bits in mode. */