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: problem with BImode and BITS_PER_UNIT != 8


Hello,

For the c4x target I had some problems with the BImode change. This target
has BITS_PER_UNIT defined as 32. This means that QImode is 32 bits. I modified
the macro in rtl.c which generates the mode_bitsize array. It now works
correctly when BITS_PER_UNIT != 8.

2000-09-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	Mon Sep 25 21:27:09 2000
+++ rtl.c	Mon Sep 25 21:27:23 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"




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