Commit f7043461 by Kaveh R. Ghazi Committed by Kaveh Ghazi

loop.c (scan_loop, [...]): Cast to avoid signed/unsigned warnings.

	* loop.c (scan_loop, move_movables, count_one_set): Cast to avoid
	signed/unsigned warnings.

	* regclass.c (init_reg_sets_1, choose_hard_reg_mode,
	record_reg_classes): Likewise.

	* reload.c (reload_inner_reg_of_subreg, push_reload,
	find_reloads_address_1): Likewise.

From-SVN: r56350
parent b4d330e1
2002-08-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* loop.c (scan_loop, move_movables, count_one_set): Cast to avoid
signed/unsigned warnings.
* regclass.c (init_reg_sets_1, choose_hard_reg_mode,
record_reg_classes): Likewise.
* reload.c (reload_inner_reg_of_subreg, push_reload,
find_reloads_address_1): Likewise.
2002-08-15 David Edelsohn <edelsohn@gnu.org> 2002-08-15 David Edelsohn <edelsohn@gnu.org>
* rs6000.c (output_mi_thunk): Return to function section on * rs6000.c (output_mi_thunk): Return to function section on
......
...@@ -896,7 +896,7 @@ scan_loop (loop, flags) ...@@ -896,7 +896,7 @@ scan_loop (loop, flags)
SET_DEST (set), copy_rtx (SET_SRC (set))); SET_DEST (set), copy_rtx (SET_SRC (set)));
delete_insn (p); delete_insn (p);
for (i = 0; i < LOOP_REGNO_NREGS (regno, SET_DEST (set)); i++) for (i = 0; i < (int) LOOP_REGNO_NREGS (regno, SET_DEST (set)); i++)
regs->array[regno+i].set_in_loop = 0; regs->array[regno+i].set_in_loop = 0;
continue; continue;
} }
...@@ -927,7 +927,7 @@ scan_loop (loop, flags) ...@@ -927,7 +927,7 @@ scan_loop (loop, flags)
m->savings = regs->array[regno].n_times_set; m->savings = regs->array[regno].n_times_set;
if (find_reg_note (p, REG_RETVAL, NULL_RTX)) if (find_reg_note (p, REG_RETVAL, NULL_RTX))
m->savings += libcall_benefit (p); m->savings += libcall_benefit (p);
for (i = 0; i < LOOP_REGNO_NREGS (regno, SET_DEST (set)); i++) for (i = 0; i < (int) LOOP_REGNO_NREGS (regno, SET_DEST (set)); i++)
regs->array[regno+i].set_in_loop = move_insn ? -2 : -1; regs->array[regno+i].set_in_loop = move_insn ? -2 : -1;
/* Add M to the end of the chain MOVABLES. */ /* Add M to the end of the chain MOVABLES. */
loop_movables_add (movables, m); loop_movables_add (movables, m);
...@@ -1029,7 +1029,7 @@ scan_loop (loop, flags) ...@@ -1029,7 +1029,7 @@ scan_loop (loop, flags)
m->match = 0; m->match = 0;
m->lifetime = LOOP_REG_LIFETIME (loop, regno); m->lifetime = LOOP_REG_LIFETIME (loop, regno);
m->savings = 1; m->savings = 1;
for (i = 0; i < LOOP_REGNO_NREGS (regno, SET_DEST (set)); i++) for (i = 0; i < (int) LOOP_REGNO_NREGS (regno, SET_DEST (set)); i++)
regs->array[regno+i].set_in_loop = -1; regs->array[regno+i].set_in_loop = -1;
/* Add M to the end of the chain MOVABLES. */ /* Add M to the end of the chain MOVABLES. */
loop_movables_add (movables, m); loop_movables_add (movables, m);
...@@ -2170,7 +2170,7 @@ move_movables (loop, movables, threshold, insn_count) ...@@ -2170,7 +2170,7 @@ move_movables (loop, movables, threshold, insn_count)
if (! m->partial) if (! m->partial)
{ {
int i; int i;
for (i = 0; i < LOOP_REGNO_NREGS (regno, m->set_dest); i++) for (i = 0; i < (int) LOOP_REGNO_NREGS (regno, m->set_dest); i++)
regs->array[regno+i].set_in_loop = 0; regs->array[regno+i].set_in_loop = 0;
} }
...@@ -2235,7 +2235,7 @@ move_movables (loop, movables, threshold, insn_count) ...@@ -2235,7 +2235,7 @@ move_movables (loop, movables, threshold, insn_count)
{ {
int i; int i;
for (i = 0; for (i = 0;
i < LOOP_REGNO_NREGS (regno, m1->set_dest); i < (int) LOOP_REGNO_NREGS (regno, m1->set_dest);
i++) i++)
regs->array[m1->regno+i].set_in_loop = 0; regs->array[m1->regno+i].set_in_loop = 0;
} }
...@@ -3495,7 +3495,7 @@ count_one_set (regs, insn, x, last_set) ...@@ -3495,7 +3495,7 @@ count_one_set (regs, insn, x, last_set)
{ {
int i; int i;
int regno = REGNO (dest); int regno = REGNO (dest);
for (i = 0; i < LOOP_REGNO_NREGS (regno, dest); i++) for (i = 0; i < (int) LOOP_REGNO_NREGS (regno, dest); i++)
{ {
/* If this is the first setting of this reg /* If this is the first setting of this reg
in current basic block, and it was set before, in current basic block, and it was set before,
......
...@@ -483,7 +483,7 @@ init_reg_sets_1 () ...@@ -483,7 +483,7 @@ init_reg_sets_1 ()
memset (allocatable_regs_of_mode, 0, sizeof (allocatable_regs_of_mode)); memset (allocatable_regs_of_mode, 0, sizeof (allocatable_regs_of_mode));
for (m = 0; m < (unsigned int) MAX_MACHINE_MODE; m++) for (m = 0; m < (unsigned int) MAX_MACHINE_MODE; m++)
for (i = 0; i < N_REG_CLASSES; i++) for (i = 0; i < N_REG_CLASSES; i++)
if (CLASS_MAX_NREGS (i, m) <= reg_class_size[i]) if ((unsigned) CLASS_MAX_NREGS (i, m) <= reg_class_size[i])
for (j = 0; j < FIRST_PSEUDO_REGISTER; j++) for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
if (!fixed_regs [j] && TEST_HARD_REG_BIT (reg_class_contents[i], j) if (!fixed_regs [j] && TEST_HARD_REG_BIT (reg_class_contents[i], j)
&& HARD_REGNO_MODE_OK (j, m)) && HARD_REGNO_MODE_OK (j, m))
...@@ -696,7 +696,7 @@ choose_hard_reg_mode (regno, nregs) ...@@ -696,7 +696,7 @@ choose_hard_reg_mode (regno, nregs)
for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
mode != VOIDmode; mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode)) mode = GET_MODE_WIDER_MODE (mode))
if (HARD_REGNO_NREGS (regno, mode) == nregs if ((unsigned) HARD_REGNO_NREGS (regno, mode) == nregs
&& HARD_REGNO_MODE_OK (regno, mode)) && HARD_REGNO_MODE_OK (regno, mode))
found_mode = mode; found_mode = mode;
...@@ -706,7 +706,7 @@ choose_hard_reg_mode (regno, nregs) ...@@ -706,7 +706,7 @@ choose_hard_reg_mode (regno, nregs)
for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
mode != VOIDmode; mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode)) mode = GET_MODE_WIDER_MODE (mode))
if (HARD_REGNO_NREGS (regno, mode) == nregs if ((unsigned) HARD_REGNO_NREGS (regno, mode) == nregs
&& HARD_REGNO_MODE_OK (regno, mode)) && HARD_REGNO_MODE_OK (regno, mode))
found_mode = mode; found_mode = mode;
...@@ -716,7 +716,7 @@ choose_hard_reg_mode (regno, nregs) ...@@ -716,7 +716,7 @@ choose_hard_reg_mode (regno, nregs)
for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
mode != VOIDmode; mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode)) mode = GET_MODE_WIDER_MODE (mode))
if (HARD_REGNO_NREGS (regno, mode) == nregs if ((unsigned) HARD_REGNO_NREGS (regno, mode) == nregs
&& HARD_REGNO_MODE_OK (regno, mode)) && HARD_REGNO_MODE_OK (regno, mode))
found_mode = mode; found_mode = mode;
...@@ -726,7 +726,7 @@ choose_hard_reg_mode (regno, nregs) ...@@ -726,7 +726,7 @@ choose_hard_reg_mode (regno, nregs)
for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
mode != VOIDmode; mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode)) mode = GET_MODE_WIDER_MODE (mode))
if (HARD_REGNO_NREGS (regno, mode) == nregs if ((unsigned) HARD_REGNO_NREGS (regno, mode) == nregs
&& HARD_REGNO_MODE_OK (regno, mode)) && HARD_REGNO_MODE_OK (regno, mode))
found_mode = mode; found_mode = mode;
...@@ -737,7 +737,7 @@ choose_hard_reg_mode (regno, nregs) ...@@ -737,7 +737,7 @@ choose_hard_reg_mode (regno, nregs)
for (m = (unsigned int) CCmode; m < (unsigned int) NUM_MACHINE_MODES; ++m) for (m = (unsigned int) CCmode; m < (unsigned int) NUM_MACHINE_MODES; ++m)
{ {
mode = (enum machine_mode) m; mode = (enum machine_mode) m;
if (HARD_REGNO_NREGS (regno, mode) == nregs if ((unsigned) HARD_REGNO_NREGS (regno, mode) == nregs
&& HARD_REGNO_MODE_OK (regno, mode)) && HARD_REGNO_MODE_OK (regno, mode))
return mode; return mode;
} }
...@@ -1877,27 +1877,27 @@ record_reg_classes (n_alts, n_ops, ops, modes, ...@@ -1877,27 +1877,27 @@ record_reg_classes (n_alts, n_ops, ops, modes,
enum reg_class pref = reg_pref[regno].prefclass; enum reg_class pref = reg_pref[regno].prefclass;
if ((reg_class_size[(unsigned char) pref] if ((reg_class_size[(unsigned char) pref]
== CLASS_MAX_NREGS (pref, mode)) == (unsigned) CLASS_MAX_NREGS (pref, mode))
&& REGISTER_MOVE_COST (mode, pref, pref) < 10 * 2) && REGISTER_MOVE_COST (mode, pref, pref) < 10 * 2)
op_costs[i].cost[(unsigned char) pref] = -1; op_costs[i].cost[(unsigned char) pref] = -1;
} }
else if (regno < FIRST_PSEUDO_REGISTER) else if (regno < FIRST_PSEUDO_REGISTER)
for (class = 0; class < N_REG_CLASSES; class++) for (class = 0; class < N_REG_CLASSES; class++)
if (TEST_HARD_REG_BIT (reg_class_contents[class], regno) if (TEST_HARD_REG_BIT (reg_class_contents[class], regno)
&& reg_class_size[class] == CLASS_MAX_NREGS (class, mode)) && reg_class_size[class] == (unsigned) CLASS_MAX_NREGS (class, mode))
{ {
if (reg_class_size[class] == 1) if (reg_class_size[class] == 1)
op_costs[i].cost[class] = -1; op_costs[i].cost[class] = -1;
else else
{ {
for (nr = 0; nr < HARD_REGNO_NREGS (regno, mode); nr++) for (nr = 0; nr < (unsigned) HARD_REGNO_NREGS (regno, mode); nr++)
{ {
if (! TEST_HARD_REG_BIT (reg_class_contents[class], if (! TEST_HARD_REG_BIT (reg_class_contents[class],
regno + nr)) regno + nr))
break; break;
} }
if (nr == HARD_REGNO_NREGS (regno,mode)) if (nr == (unsigned) HARD_REGNO_NREGS (regno,mode))
op_costs[i].cost[class] = -1; op_costs[i].cost[class] = -1;
} }
} }
......
...@@ -826,7 +826,7 @@ reload_inner_reg_of_subreg (x, mode) ...@@ -826,7 +826,7 @@ reload_inner_reg_of_subreg (x, mode)
return (GET_MODE_SIZE (mode) <= UNITS_PER_WORD return (GET_MODE_SIZE (mode) <= UNITS_PER_WORD
&& GET_MODE_SIZE (GET_MODE (inner)) > UNITS_PER_WORD && GET_MODE_SIZE (GET_MODE (inner)) > UNITS_PER_WORD
&& ((GET_MODE_SIZE (GET_MODE (inner)) / UNITS_PER_WORD) && ((GET_MODE_SIZE (GET_MODE (inner)) / UNITS_PER_WORD)
!= HARD_REGNO_NREGS (REGNO (inner), GET_MODE (inner)))); != (int) HARD_REGNO_NREGS (REGNO (inner), GET_MODE (inner))));
} }
/* Record one reload that needs to be performed. /* Record one reload that needs to be performed.
...@@ -1003,8 +1003,8 @@ push_reload (in, out, inloc, outloc, class, ...@@ -1003,8 +1003,8 @@ push_reload (in, out, inloc, outloc, class,
> UNITS_PER_WORD) > UNITS_PER_WORD)
&& ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))) && ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (in)))
/ UNITS_PER_WORD) / UNITS_PER_WORD)
!= HARD_REGNO_NREGS (REGNO (SUBREG_REG (in)), != (int) HARD_REGNO_NREGS (REGNO (SUBREG_REG (in)),
GET_MODE (SUBREG_REG (in))))) GET_MODE (SUBREG_REG (in)))))
|| ! HARD_REGNO_MODE_OK (subreg_regno (in), inmode))) || ! HARD_REGNO_MODE_OK (subreg_regno (in), inmode)))
#ifdef SECONDARY_INPUT_RELOAD_CLASS #ifdef SECONDARY_INPUT_RELOAD_CLASS
|| (SECONDARY_INPUT_RELOAD_CLASS (class, inmode, in) != NO_REGS || (SECONDARY_INPUT_RELOAD_CLASS (class, inmode, in) != NO_REGS
...@@ -1105,8 +1105,8 @@ push_reload (in, out, inloc, outloc, class, ...@@ -1105,8 +1105,8 @@ push_reload (in, out, inloc, outloc, class,
> UNITS_PER_WORD) > UNITS_PER_WORD)
&& ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))) && ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (out)))
/ UNITS_PER_WORD) / UNITS_PER_WORD)
!= HARD_REGNO_NREGS (REGNO (SUBREG_REG (out)), != (int) HARD_REGNO_NREGS (REGNO (SUBREG_REG (out)),
GET_MODE (SUBREG_REG (out))))) GET_MODE (SUBREG_REG (out)))))
|| ! HARD_REGNO_MODE_OK (subreg_regno (out), outmode))) || ! HARD_REGNO_MODE_OK (subreg_regno (out), outmode)))
#ifdef SECONDARY_OUTPUT_RELOAD_CLASS #ifdef SECONDARY_OUTPUT_RELOAD_CLASS
|| (SECONDARY_OUTPUT_RELOAD_CLASS (class, outmode, out) != NO_REGS || (SECONDARY_OUTPUT_RELOAD_CLASS (class, outmode, out) != NO_REGS
...@@ -5639,7 +5639,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) ...@@ -5639,7 +5639,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn)
{ {
enum reg_class class = (context ? INDEX_REG_CLASS enum reg_class class = (context ? INDEX_REG_CLASS
: MODE_BASE_REG_CLASS (mode)); : MODE_BASE_REG_CLASS (mode));
if (CLASS_MAX_NREGS (class, GET_MODE (SUBREG_REG (x))) if ((unsigned) CLASS_MAX_NREGS (class, GET_MODE (SUBREG_REG (x)))
> reg_class_size[class]) > reg_class_size[class])
{ {
x = find_reloads_subreg_address (x, 0, opnum, type, x = find_reloads_subreg_address (x, 0, opnum, type,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment