REG_CLASS_CONTENTS initializer fix
Richard Henderson
rth@redhat.com
Mon Jul 16 10:59:00 GMT 2001
Brought to light by the T3 port that was posted a while ago.
We have it documented that we only take 32 bits per initializer
from REG_CLASS_CONTENTS, but we weren't actually honoring that.
Sanity checked on alphaev56 linux.
r~
* regclass.c (init_reg_sets): Use only 32 bits per initializer
from int_reg_class_contents.
Index: regclass.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regclass.c,v
retrieving revision 1.121
diff -u -p -r1.121 regclass.c
--- regclass.c 2001/06/22 23:27:47 1.121
+++ regclass.c 2001/07/16 06:46:10
@@ -266,9 +275,10 @@ init_reg_sets ()
{
CLEAR_HARD_REG_SET (reg_class_contents[i]);
+ /* Note that we hard-code 32 here, not HOST_BITS_PER_INT. */
for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
- if (int_reg_class_contents[i][j / HOST_BITS_PER_INT]
- & ((unsigned) 1 << (j % HOST_BITS_PER_INT)))
+ if (int_reg_class_contents[i][j / 32]
+ & ((unsigned) 1 << (j % 32)))
SET_HARD_REG_BIT (reg_class_contents[i], j);
}
More information about the Gcc-patches
mailing list