aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorCharles Hannum <mycroft@gnu.org>1992-07-08 10:28:26 +0000
committerCharles Hannum <mycroft@gnu.org>1992-07-08 10:28:26 +0000
commit2e0e2b76bea575afc3070ebd4d3c47deade86221 (patch)
treed9f060c99cef3dbccb8b5dd3c1cdac5f5af9a002 /gcc
parent3b5e8cb62ed7db313c0f75bd4bc722bd95b1d093 (diff)
downloadgcc-2e0e2b76bea575afc3070ebd4d3c47deade86221.zip
gcc-2e0e2b76bea575afc3070ebd4d3c47deade86221.tar.gz
gcc-2e0e2b76bea575afc3070ebd4d3c47deade86221.tar.bz2
*** empty log message ***
From-SVN: r1515
Diffstat (limited to 'gcc')
-rw-r--r--gcc/regclass.c25
-rw-r--r--gcc/stmt.c7
2 files changed, 24 insertions, 8 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 58399dd..cd5b0d0 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -103,7 +103,17 @@ int reg_alloc_order[FIRST_PSEUDO_REGISTER] = REG_ALLOC_ORDER;
/* For each reg class, a HARD_REG_SET saying which registers are in it. */
-HARD_REG_SET reg_class_contents[] = REG_CLASS_CONTENTS;
+HARD_REG_SET reg_class_contents[N_REG_CLASSES];
+
+/* The same information, but as an array of ints. We copy from these
+ ints to the table above. This is done so that the tm.h files do
+ not have to be aware of the wordsize for machines with <= 64 regs. */
+
+#define N_REG_INTS \
+ ((FIRST_PSEUDO_REGISTER + (HOST_BITS_PER_INT - 1)) / HOST_BITS_PER_INT)
+
+static int int_reg_class_contents[N_REG_CLASSES][N_REG_INTS]
+ = REG_CLASS_CONTENTS;
/* For each reg class, number of regs it contains. */
@@ -158,6 +168,19 @@ init_reg_sets ()
{
register int i, j;
+ /* First copy the register information from the initial int form into
+ the regsets. */
+
+ for (i = 0; i < N_REG_CLASSES; i++)
+ {
+ CLEAR_HARD_REG_SET (reg_class_contents[i]);
+
+ for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
+ if (int_reg_class_contents[i][j / HOST_BITS_PER_INT]
+ & (1 << (j % HOST_BITS_PER_INT)))
+ SET_HARD_REG_BIT (reg_class_contents[i], j);
+ }
+
bcopy (initial_fixed_regs, fixed_regs, sizeof fixed_regs);
bcopy (initial_call_used_regs, call_used_regs, sizeof call_used_regs);
bzero (global_regs, sizeof global_regs);
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 8377265..b9cea5f 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -3240,9 +3240,6 @@ pushcase (value, label, duplicate)
if (index_type == error_mark_node)
return 0;
- /* There may be NOP_EXPR around the value if we got it from an enum. */
- STRIP_NOPS (value);
-
/* Convert VALUE to the type in which the comparisons are nominally done. */
if (value != 0)
value = convert (nominal_type, value);
@@ -3372,10 +3369,6 @@ pushcase_range (value1, value2, label, duplicate)
}
case_stack->data.case_stmt.seenlabel = 1;
- /* There may be NOP_EXPR around the value if we got it from an enum. */
- STRIP_NOPS (value1);
- STRIP_NOPS (value2);
-
/* Convert VALUEs to type in which the comparisons are nominally done. */
if (value1 == 0) /* Negative infinity. */
value1 = TYPE_MIN_VALUE(index_type);