* Makefile.in (sched.o): Depend on recog.h.
* alias.c (REG_BASE_VALUE): Cast the result of REGNO() macro to
(unsigned) when comparing against one.
(find_base_value): Likewise.
(record_base_value): Cast variable `regno' to (unsigned) when
comparing against one. Cast the result of REGNO() macro to
(unsigned) when comparing against one.
(memrefs_conflict_p): Change type of variables `r_x' and `r_y' to
unsigned.
(init_alias_analysis): Add unsigned variable `ui'. Use it as loop
variable where an unsigned index is needed.
* caller-save.c (init_caller_save): Cast `-1' to (enum insn_code)
before comparing against one.
* collect2.c: Add prototypes for functions `error', `fatal' and
`fatal_perror'. Make these functions take variable arguments
instead of faking it with a fixed number of args.
(write_c_file_stat): Cast the argument of ctype macro to (unsigned
char).
* combine.c (can_combine_p): Mark parameter `pred' with
ATTRIBUTE_UNUSED.
(find_split_point): Cast variable `src' to (unsigned
HOST_WIDE_INT) when comparing against one.
HOST_WIDE_INT) when comparing against one.
(simplify_rtx): Cast 1 to (unsigned HOST_WIDE_INT) in shift.
(simplify_logical): Likewise.
(force_to_mode): Cast result of INTVAL() macro to (unsigned
HOST_WIDE_INT) when comparing against one. Cast 1 to (unsigned
HOST_WIDE_INT) in shift.
(simplify_and_const_int): Cast result of INTVAL() macro to
`unsigned HOST_WIDE_INT' when comparing against one.
(merge_outer_ops): Cast variable const0 to `unsigned
HOST_WIDE_INT' when comparing against the result of
GET_MODE_MASK() macro.
(simplify_comparison): Likewise for variable `c0'. Cast variable
`const_op' to `unsigned HOST_WIDE_INT' when comparing against
one. Cast `1' to `unsigned HOST_WIDE_INT' in shift. Cast the
result of `GET_MODE_MASK()/2' to `HOST_WIDE_INT' when comparing
against one. Cast `1' to `unsigned HOST_WIDE_INT' in shift. Cast
result of INTVAL() macro to `unsigned HOST_WIDE_INT' when
comparing against one.
(distribute_notes): Wrap variable `cc0_setter' in macro `HAVE_cc0'.
config/mips/mips.c (gen_int_relational): Cast result of INTVAL()
macro to `unsigned HOST_WIDE_INT' when comparing against one.
(output_block_move): Cast `sizeof' expression to (int) when
comparing against one.
(function_arg): Cast BITS_PER_WORD to `unsigned' when comparing
against one.
(save_restore_insns): Cast `base_offset' to `long' to match format
specifier in fprintf.
* config/mips/mips.h (Pmode): Cast the result of `Pmode' macro
to `enum machine_mode'.
* flow.c (life_analysis_1): Remove unused variable `insn'.
* gcc.c (translate_options): Move variables `j' and `k' into the
scope in which they are used. Change their types to `size_t'.
(set_spec): Cast the argument of ctype macro to `unsigned char'.
(read_specs): Likewise.
(process_command): Cast `sizeof' to (int) when comparing against one.
(do_spec_1): Cast the argument of ctype macro to `unsigned char'.
(handle_braces): Cast both sides of `==' expression to `long' to
ensure sign matching.
(main): Cast variable `i' to `int' when comparing against one.
* gcov-io.h (__fetch_long): Change type of parameter `bytes' from
int to size_t. Cast variable `i' to size_t when comparing against
one.
* genattrtab.c (convert_set_attr_alternative): Remove unused
parameter `insn_code'. All callers changed.
(convert_set_attr): Likewise.
* genrecog.c (add_to_sequence): Cast result of XVECLEN() macro to
size_t when comparing against one. Likewise for variable `len'.
* global.c (global_alloc): Cast variable `max_regno' to size_t
when comparing against one. Likewise for variable `max_allocno'.
* jump.c (sets_cc0_p): Mark parameter `x' with ATTRIBUTE_UNUSED.
* local-alloc.c (validate_equiv_mem_from_store): Mark parameter
`set' with ATTRIBUTE_UNUSED.
(find_free_reg): Cast `sizeof' expression to (int) when comparing
against one.
* loop.c (count_loop_regs_set): Remove unused variable `dest'.
(strength_reduce): Mark parameter `bct_p' with ATTRIBUTE_UNUSED.
(get_condition): Cast variable `const_val' to `unsigned
HOST_WIDE_INT' when comparing against one. Cast unsigned
expression to HOST_WIDE_INT when comparing against one.
(insert_loop_mem): Mark parameter `data' with ATTRIBUTE_UNUSED.
(load_mems_and_recount_loop_regs_set): Cast variable `nregs' to
`unsigned' when comparing against one.
* protoize.c (is_id_char): Change type of parameter `ch' to
unsigned char.
(munge_compile_params): Cast argument of ctype macro to (const
unsigned char).
(process_aux_info_file): Cast variable `aux_info_size' to int when
comparing against one.
(forward_to_next_token_char): Cast argument of ctype macro to
`const unsigned char'.
(edit_formals_lists): Likewise.
(find_rightmost_formals_list): Likewise.
(add_local_decl): Likewise.
(add_global_decls): Likewise.
(edit_fn_definition): Likewise.
(do_cleaning): Likewise.
(scan_for_missed_items): Likewise.
(edit_file): Cast variable `orig_size' to (int) when comparing
against one.
(main): Cast argument of ctype macro to `const unsigned char'.
* recog.c (const_int_operand): Mark parameter `mode' with
ATTRIBUTE_UNUSED.
* regclass.c (record_reg_classes): Change type of variable `c' to
`unsigned char'. Cast `char' array index to `unsigned char'.
* reload.c (push_secondary_reload): Cast argument to
REG_CLASS_FROM_LETTER() macro to `unsigned char'.
* reload1.c (calculate_needs): Cast `char' array index to
`unsigned char'.
(set_label_offsets): Change type of variable `i' to unsigned int.
Cast result of XVECLEN() macro to unsigned when comparing against
one.
(mark_not_eliminable): Change type of variable `i' to unsigned.
(order_regs_for_reload): Likewise. Cast `max_regno' to unsigned
when comparing against one.
(reload_as_needed): Cast macro NUM_ELIMINABLE_REGS to (int) when
comparing against one.
(choose_reload_regs): Hide unused label `fail'.
(reload_cse_simplify_operands): Cast `char' array index to
`unsigned char'.
(reload_combine_note_store): Mark parameter `set' with
ATTRIBUTE_UNUSED. Cast UNITS_PER_WORD to unsigned when comparing
against one.
(reload_cse_move2add): Remove unused variable `src2'.
* sched.c: Include recog.h.
(sched_note_set): Remove unused parameter `b'. All callers
changed.
(split_hard_reg_notes): Likewise for parameter `orig_insn'.
(blockage_range): Cast result of UNIT_BLOCKED() macro to (int)
when comparing against one.
* stupid.c (stupid_find_reg): Mark parameter `changes_size' with
ATTRIBUTE_UNUSED. Cast `sizeof' expression to (int) when
comparing against one.
* unroll.c (precondition_loop_p): Remove unused parameter
`loop_end'. All callers changed.
From-SVN: r23079
+Wed Oct 14 11:14:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (sched.o): Depend on recog.h.
+
+ * alias.c (REG_BASE_VALUE): Cast the result of REGNO() macro to
+ (unsigned) when comparing against one.
+ (find_base_value): Likewise.
+ (record_base_value): Cast variable `regno' to (unsigned) when
+ comparing against one. Cast the result of REGNO() macro to
+ (unsigned) when comparing against one.
+ (memrefs_conflict_p): Change type of variables `r_x' and `r_y' to
+ unsigned.
+ (init_alias_analysis): Add unsigned variable `ui'. Use it as loop
+ variable where an unsigned index is needed.
+
+ * caller-save.c (init_caller_save): Cast `-1' to (enum insn_code)
+ before comparing against one.
+
+ * collect2.c: Add prototypes for functions `error', `fatal' and
+ `fatal_perror'. Make these functions take variable arguments
+ instead of faking it with a fixed number of args.
+ (write_c_file_stat): Cast the argument of ctype macro to (unsigned
+ char).
+
+ * combine.c (can_combine_p): Mark parameter `pred' with
+ ATTRIBUTE_UNUSED.
+ (find_split_point): Cast variable `src' to (unsigned
+ HOST_WIDE_INT) when comparing against one.
+ (simplify_rtx): Cast 1 to (unsigned HOST_WIDE_INT) in shift.
+ (simplify_logical): Likewise.
+ (force_to_mode): Cast result of INTVAL() macro to (unsigned
+ HOST_WIDE_INT) when comparing against one. Cast 1 to (unsigned
+ HOST_WIDE_INT) in shift.
+ (simplify_and_const_int): Cast result of INTVAL() macro to
+ `unsigned HOST_WIDE_INT' when comparing against one.
+ (merge_outer_ops): Cast variable const0 to `unsigned
+ HOST_WIDE_INT' when comparing against the result of
+ GET_MODE_MASK() macro.
+ (simplify_comparison): Likewise for variable `c0'. Cast variable
+ `const_op' to `unsigned HOST_WIDE_INT' when comparing against
+ one. Cast `1' to `unsigned HOST_WIDE_INT' in shift. Cast the
+ result of `GET_MODE_MASK()/2' to `HOST_WIDE_INT' when comparing
+ against one. Cast `1' to `unsigned HOST_WIDE_INT' in shift. Cast
+ result of INTVAL() macro to `unsigned HOST_WIDE_INT' when
+ comparing against one.
+ (distribute_notes): Wrap variable `cc0_setter' in macro `HAVE_cc0'.
+
+ config/mips/mips.c (gen_int_relational): Cast result of INTVAL()
+ macro to `unsigned HOST_WIDE_INT' when comparing against one.
+ (output_block_move): Cast `sizeof' expression to (int) when
+ comparing against one.
+ (function_arg): Cast BITS_PER_WORD to `unsigned' when comparing
+ against one.
+ (save_restore_insns): Cast `base_offset' to `long' to match format
+ specifier in fprintf.
+
+ * config/mips/mips.h (Pmode): Cast the result of `Pmode' macro
+ to `enum machine_mode'.
+
+ * flow.c (life_analysis_1): Remove unused variable `insn'.
+
+ * gcc.c (translate_options): Move variables `j' and `k' into the
+ scope in which they are used. Change their types to `size_t'.
+ (set_spec): Cast the argument of ctype macro to `unsigned char'.
+ (read_specs): Likewise.
+ (process_command): Cast `sizeof' to (int) when comparing against one.
+ (do_spec_1): Cast the argument of ctype macro to `unsigned char'.
+ (handle_braces): Cast both sides of `==' expression to `long' to
+ ensure sign matching.
+ (main): Cast variable `i' to `int' when comparing against one.
+
+ * gcov-io.h (__fetch_long): Change type of parameter `bytes' from
+ int to size_t. Cast variable `i' to size_t when comparing against
+ one.
+
+ * genattrtab.c (convert_set_attr_alternative): Remove unused
+ parameter `insn_code'. All callers changed.
+ (convert_set_attr): Likewise.
+
+ * genrecog.c (add_to_sequence): Cast result of XVECLEN() macro to
+ size_t when comparing against one. Likewise for variable `len'.
+
+ * global.c (global_alloc): Cast variable `max_regno' to size_t
+ when comparing against one. Likewise for variable `max_allocno'.
+
+ * jump.c (sets_cc0_p): Mark parameter `x' with ATTRIBUTE_UNUSED.
+
+ * local-alloc.c (validate_equiv_mem_from_store): Mark parameter
+ `set' with ATTRIBUTE_UNUSED.
+ (find_free_reg): Cast `sizeof' expression to (int) when comparing
+ against one.
+
+ * loop.c (count_loop_regs_set): Remove unused variable `dest'.
+ (strength_reduce): Mark parameter `bct_p' with ATTRIBUTE_UNUSED.
+ (get_condition): Cast variable `const_val' to `unsigned
+ HOST_WIDE_INT' when comparing against one. Cast unsigned
+ expression to HOST_WIDE_INT when comparing against one.
+ (insert_loop_mem): Mark parameter `data' with ATTRIBUTE_UNUSED.
+ (load_mems_and_recount_loop_regs_set): Cast variable `nregs' to
+ `unsigned' when comparing against one.
+
+ * protoize.c (is_id_char): Change type of parameter `ch' to
+ unsigned char.
+ (munge_compile_params): Cast argument of ctype macro to (const
+ unsigned char).
+ (process_aux_info_file): Cast variable `aux_info_size' to int when
+ comparing against one.
+ (forward_to_next_token_char): Cast argument of ctype macro to
+ `const unsigned char'.
+ (edit_formals_lists): Likewise.
+ (find_rightmost_formals_list): Likewise.
+ (add_local_decl): Likewise.
+ (add_global_decls): Likewise.
+ (edit_fn_definition): Likewise.
+ (do_cleaning): Likewise.
+ (scan_for_missed_items): Likewise.
+ (edit_file): Cast variable `orig_size' to (int) when comparing
+ against one.
+ (main): Cast argument of ctype macro to `const unsigned char'.
+
+ * recog.c (const_int_operand): Mark parameter `mode' with
+ ATTRIBUTE_UNUSED.
+
+ * regclass.c (record_reg_classes): Change type of variable `c' to
+ `unsigned char'. Cast `char' array index to `unsigned char'.
+
+ * reload.c (push_secondary_reload): Cast argument to
+ REG_CLASS_FROM_LETTER() macro to `unsigned char'.
+
+ * reload1.c (calculate_needs): Cast `char' array index to
+ `unsigned char'.
+ (set_label_offsets): Change type of variable `i' to unsigned int.
+ Cast result of XVECLEN() macro to unsigned when comparing against
+ one.
+ (mark_not_eliminable): Change type of variable `i' to unsigned.
+ (order_regs_for_reload): Likewise. Cast `max_regno' to unsigned
+ when comparing against one.
+ (reload_as_needed): Cast macro NUM_ELIMINABLE_REGS to (int) when
+ comparing against one.
+ (choose_reload_regs): Hide unused label `fail'.
+ (reload_cse_simplify_operands): Cast `char' array index to
+ `unsigned char'.
+ (reload_combine_note_store): Mark parameter `set' with
+ ATTRIBUTE_UNUSED. Cast UNITS_PER_WORD to unsigned when comparing
+ against one.
+ (reload_cse_move2add): Remove unused variable `src2'.
+
+ * sched.c: Include recog.h.
+ (sched_note_set): Remove unused parameter `b'. All callers
+ changed.
+ (split_hard_reg_notes): Likewise for parameter `orig_insn'.
+ (blockage_range): Cast result of UNIT_BLOCKED() macro to (int)
+ when comparing against one.
+
+ * stupid.c (stupid_find_reg): Mark parameter `changes_size' with
+ ATTRIBUTE_UNUSED. Cast `sizeof' expression to (int) when
+ comparing against one.
+
+ * unroll.c (precondition_loop_p): Remove unused parameter
+ `loop_end'. All callers changed.
+
Tue Oct 13 22:12:11 1998 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* reload1.c (maybe_fix_stack_asms): New static function.
$(RECOG_H) output.h reload.h $(REGS_H) hard-reg-set.h flags.h \
$(EXPR_H) insn-flags.h $(BASIC_BLOCK_H) toplev.h
$(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) system.h $(RTL_H) \
- $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \
- toplev.h
+ $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h \
+ insn-attr.h toplev.h recog.h
final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h $(REGS_H) \
$(RECOG_H) conditions.h insn-config.h insn-attr.h except.h real.h output.h \
hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h \
rtx *new_reg_base_value;
unsigned int reg_base_value_size; /* size of reg_base_value array */
#define REG_BASE_VALUE(X) \
- (REGNO (X) < reg_base_value_size ? reg_base_value[REGNO (X)] : 0)
+ ((unsigned) REGNO (X) < reg_base_value_size ? reg_base_value[REGNO (X)] : 0)
/* Vector of known invariant relationships between registers. Set in
loop unrolling. Indexed by register number, if nonzero the value
The test above is not sufficient because the scheduler may move
a copy out of an arg reg past the NOTE_INSN_FUNCTION_BEGIN. */
if (REGNO (src) >= FIRST_PSEUDO_REGISTER
- && REGNO (src) < reg_base_value_size
+ && (unsigned) REGNO (src) < reg_base_value_size
&& reg_base_value[REGNO (src)])
return reg_base_value[REGNO (src)];
rtx val;
int invariant;
{
- if (regno >= reg_base_value_size)
+ if ((unsigned) regno >= reg_base_value_size)
return;
/* If INVARIANT is true then this value also describes an invariant
if (GET_CODE (val) == REG)
{
- if (REGNO (val) < reg_base_value_size)
+ if ((unsigned) REGNO (val) < reg_base_value_size)
{
reg_base_value[regno] = reg_base_value[REGNO (val)];
}
/* Are these registers known not to be equal? */
if (alias_invariant)
{
- int r_x = REGNO (x), r_y = REGNO (y);
+ unsigned int r_x = REGNO (x), r_y = REGNO (y);
rtx i_x, i_y; /* invariant relationships of X and Y */
i_x = r_x >= reg_base_value_size ? 0 : alias_invariant[r_x];
int maxreg = max_reg_num ();
int changed, pass;
register int i;
+ register unsigned int ui;
register rtx insn;
reg_known_value_size = maxreg;
}
/* Now propagate values from new_reg_base_value to reg_base_value. */
- for (i = 0; i < reg_base_value_size; i++)
+ for (ui = 0; ui < reg_base_value_size; ui++)
{
- if (new_reg_base_value[i]
- && new_reg_base_value[i] != reg_base_value[i]
- && ! rtx_equal_p (new_reg_base_value[i], reg_base_value[i]))
+ if (new_reg_base_value[ui]
+ && new_reg_base_value[ui] != reg_base_value[ui]
+ && ! rtx_equal_p (new_reg_base_value[ui], reg_base_value[ui]))
{
- reg_base_value[i] = new_reg_base_value[i];
+ reg_base_value[ui] = new_reg_base_value[ui];
changed = 1;
}
}
{
changed = 0;
pass++;
- for (i = 0; i < reg_base_value_size; i++)
+ for (ui = 0; ui < reg_base_value_size; ui++)
{
- rtx base = reg_base_value[i];
+ rtx base = reg_base_value[ui];
if (base && GET_CODE (base) == REG)
{
- int base_regno = REGNO (base);
- if (base_regno == i) /* register set from itself */
- reg_base_value[i] = 0;
+ unsigned int base_regno = REGNO (base);
+ if (base_regno == ui) /* register set from itself */
+ reg_base_value[ui] = 0;
else
- reg_base_value[i] = reg_base_value[base_regno];
+ reg_base_value[ui] = reg_base_value[base_regno];
changed = 1;
}
}
/* Now extract both insns and see if we can meet their
constraints. */
- ok = (reg_save_code[i][j] != -1 && reg_restore_code[i][j] != -1);
+ ok = (reg_save_code[i][j] != (enum insn_code)-1
+ && reg_restore_code[i][j] != (enum insn_code)-1);
if (ok)
{
insn_extract (saveinsn);
static char *libexts[3] = {"a", "so", NULL}; /* possible library extentions */
#endif
+void error PVPROTO((const char *, ...)) ATTRIBUTE_PRINTF_1;
+void fatal PVPROTO((const char *, ...))
+ ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fatal_perror PVPROTO((const char *, ...))
+ ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
static char *my_strerror PROTO((int));
static const char *my_strsignal PROTO((int));
static void handler PROTO((int));
/* Die when sys call fails. */
void
-fatal_perror (string, arg1, arg2, arg3)
- char *string, *arg1, *arg2, *arg3;
+fatal_perror VPROTO((const char * string, ...))
{
+#ifndef __STDC__
+ const char *string;
+#endif
int e = errno;
+ va_list ap;
+
+ VA_START (ap, string);
+
+#ifndef __STDC__
+ string = va_arg (ap, const char *);
+#endif
fprintf (stderr, "collect2: ");
- fprintf (stderr, string, arg1, arg2, arg3);
+ vfprintf (stderr, string, ap);
fprintf (stderr, ": %s\n", my_strerror (e));
+ va_end (ap);
+
collect_exit (FATAL_EXIT_CODE);
}
/* Just die. */
void
-fatal (string, arg1, arg2, arg3)
- char *string, *arg1, *arg2, *arg3;
+fatal VPROTO((const char * string, ...))
{
+#ifndef __STDC__
+ const char *string;
+#endif
+ va_list ap;
+
+ VA_START (ap, string);
+
+#ifndef __STDC__
+ string = va_arg (ap, const char *);
+#endif
+
fprintf (stderr, "collect2: ");
- fprintf (stderr, string, arg1, arg2, arg3);
+ vfprintf (stderr, string, ap);
fprintf (stderr, "\n");
+ va_end (ap);
+
collect_exit (FATAL_EXIT_CODE);
}
/* Write error message. */
void
-error (string, arg1, arg2, arg3, arg4)
- char *string, *arg1, *arg2, *arg3, *arg4;
+error VPROTO((const char * string, ...))
{
+#ifndef __STDC__
+ const char * string;
+#endif
+ va_list ap;
+
+ VA_START (ap, string);
+
+#ifndef __STDC__
+ string = va_arg (ap, const char *);
+#endif
+
fprintf (stderr, "collect2: ");
- fprintf (stderr, string, arg1, arg2, arg3, arg4);
+ vfprintf (stderr, string, ap);
fprintf (stderr, "\n");
+ va_end(ap);
}
/* In case obstack is linked in, and abort is defined to fancy_abort,
strncpy (prefix, p, q - p);
prefix[q - p] = 0;
for (q = prefix; *q; q++)
- if (!ISALNUM (*q))
+ if (!ISALNUM ((unsigned char)*q))
*q = '_';
if (debug)
fprintf (stderr, "\nwrite_c_file - output name is %s, prefix is %s\n",
can_combine_p (insn, i3, pred, succ, pdest, psrc)
rtx insn;
rtx i3;
- rtx pred, succ;
+ rtx pred ATTRIBUTE_UNUSED;
+ rtx succ;
rtx *pdest, *psrc;
{
int i;
if (BITS_BIG_ENDIAN)
pos = GET_MODE_BITSIZE (mode) - len - pos;
- if (src == mask)
+ if ((unsigned HOST_WIDE_INT) src == mask)
SUBST (SET_SRC (x),
gen_binary (IOR, mode, dest, GEN_INT (src << pos)));
else
if (new_code == NE && GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
&& ((STORE_FLAG_VALUE & GET_MODE_MASK (mode))
- == (HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1))
+ == (unsigned HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE(mode)-1))
&& op1 == const0_rtx
&& mode == GET_MODE (op0)
&& (i = exact_log2 (nonzero_bits (op0, mode))) >= 0)
when STORE_FLAG_VALUE is the sign bit. */
if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
&& ((STORE_FLAG_VALUE & GET_MODE_MASK (mode))
- == (HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1))
+ == (unsigned HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1))
&& op1 == const_true_rtx
&& GET_RTX_CLASS (GET_CODE (op0)) == '<'
&& reversible_comparison_p (op0))
need it. */
if (GET_CODE (x) == AND && GET_CODE (XEXP (x, 1)) == CONST_INT
- && INTVAL (XEXP (x, 1)) == mask)
+ && (unsigned HOST_WIDE_INT) INTVAL (XEXP (x, 1)) == mask)
x = XEXP (x, 0);
/* If it remains an AND, try making another AND with the bits
/* If we are just looking for the sign bit, we don't need this shift at
all, even if it has a variable count. */
if (GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT
- && (mask == ((HOST_WIDE_INT) 1
+ && (mask == ((unsigned HOST_WIDE_INT) 1
<< (GET_MODE_BITSIZE (GET_MODE (x)) - 1))))
return force_to_mode (XEXP (x, 0), mode, mask, reg, next_select);
else
{
if (GET_CODE (XEXP (x, 1)) != CONST_INT
- || INTVAL (XEXP (x, 1)) != constop)
+ || (unsigned HOST_WIDE_INT) INTVAL (XEXP (x, 1)) != constop)
SUBST (XEXP (x, 1), GEN_INT (constop));
SUBST (XEXP (x, 0), varop);
op0 = NIL;
else if (const0 == 0 && op0 == AND)
op0 = SET;
- else if (const0 == GET_MODE_MASK (mode) && op0 == AND)
+ else if ((unsigned HOST_WIDE_INT) const0 == GET_MODE_MASK (mode)
+ && op0 == AND)
op0 = NIL;
/* If this would be an entire word for the target, but is not for
for (tmode = GET_CLASS_NARROWEST_MODE
(GET_MODE_CLASS (GET_MODE (op0)));
tmode != GET_MODE (op0); tmode = GET_MODE_WIDER_MODE (tmode))
- if (c0 == GET_MODE_MASK (tmode))
+ if ((unsigned HOST_WIDE_INT) c0 == GET_MODE_MASK (tmode))
{
op0 = gen_lowpart_for_combine (tmode, inner_op0);
op1 = gen_lowpart_for_combine (tmode, inner_op1);
|| code == LT || code == LTU)
&& mode_width <= HOST_BITS_PER_WIDE_INT
&& exact_log2 (const_op) >= 0
- && nonzero_bits (op0, mode) == const_op)
+ && nonzero_bits (op0, mode) == (unsigned HOST_WIDE_INT) const_op)
{
code = (code == EQ || code == GE || code == GEU ? NE : EQ);
op1 = const0_rtx, const_op = 0;
&& (GET_MODE_BITSIZE (GET_MODE (XEXP (op0, 0)))
<= HOST_BITS_PER_WIDE_INT)
&& ((unsigned HOST_WIDE_INT) const_op
- < (((HOST_WIDE_INT) 1
+ < (((unsigned HOST_WIDE_INT) 1
<< (GET_MODE_BITSIZE (GET_MODE (XEXP (op0, 0))) - 1)))))
{
op0 = XEXP (op0, 0);
&& GET_CODE (XEXP (SUBREG_REG (op0), 1)) == CONST_INT
&& INTVAL (XEXP (SUBREG_REG (op0), 1)) < 0
&& (- INTVAL (XEXP (SUBREG_REG (op0), 1))
- < GET_MODE_MASK (mode) / 2)
+ < (HOST_WIDE_INT)(GET_MODE_MASK (mode) / 2))
&& (unsigned HOST_WIDE_INT) const_op < GET_MODE_MASK (mode) / 2
&& (0 == (nonzero_bits (XEXP (SUBREG_REG (op0), 0),
GET_MODE (SUBREG_REG (op0)))
&& GET_CODE (XEXP (op0, 1)) == CONST_INT
&& mode_width <= HOST_BITS_PER_WIDE_INT
&& ((INTVAL (XEXP (op0, 1)) & GET_MODE_MASK (mode))
- == (HOST_WIDE_INT) 1 << (mode_width - 1)))
+ == (unsigned HOST_WIDE_INT) 1 << (mode_width - 1)))
{
op0 = XEXP (op0, 0);
code = (code == EQ ? GE : LT);
&& (INTVAL (XEXP (op0, 1)) & ~ mask) == 0
&& 0 == (~ GET_MODE_MASK (GET_MODE (SUBREG_REG (XEXP (op0, 0))))
& INTVAL (XEXP (op0, 1)))
- && INTVAL (XEXP (op0, 1)) != mask
- && (INTVAL (XEXP (op0, 1))
+ && (unsigned HOST_WIDE_INT) INTVAL (XEXP (op0, 1)) != mask
+ && ((unsigned HOST_WIDE_INT) INTVAL (XEXP (op0, 1))
!= GET_MODE_MASK (GET_MODE (SUBREG_REG (XEXP (op0, 0))))))
{
{
rtx set = single_set (tem);
rtx inner_dest = 0;
+#ifdef HAVE_cc0
rtx cc0_setter = NULL_RTX;
+#endif
if (set != 0)
for (inner_dest = SET_DEST (set);
&& p_info->const_add != 0
&& ((p_info->unsignedp
? ((unsigned HOST_WIDE_INT) (value + p_info->const_add)
- > INTVAL (cmp1))
+ > (unsigned HOST_WIDE_INT) INTVAL (cmp1))
: (value + p_info->const_add) > INTVAL (cmp1))
!= (p_info->const_add > 0))))
cmp1 = force_reg (mode, cmp1);
we would get the wrong answer if we follow the usual path;
thus, x > 0xffffffffU would turn into x > 0U. */
if ((p_info->unsignedp
- ? (unsigned HOST_WIDE_INT) new > INTVAL (cmp1)
+ ? (unsigned HOST_WIDE_INT) new >
+ (unsigned HOST_WIDE_INT) INTVAL (cmp1)
: new > INTVAL (cmp1))
!= (p_info->const_add > 0))
{
the number of registers available. */
for (i = 4;
i < last_operand
- && safe_regs < (sizeof(xoperands) / sizeof(xoperands[0]));
+ && safe_regs < (int)(sizeof(xoperands) / sizeof(xoperands[0]));
i++)
if (! reg_mentioned_p (operands[i], operands[0])
&& ! reg_mentioned_p (operands[i], operands[1]))
}
}
- if (num_regs > sizeof (load_store) / sizeof (load_store[0]))
+ if (num_regs > (int)(sizeof (load_store) / sizeof (load_store[0])))
num_regs = sizeof (load_store) / sizeof (load_store[0]);
else if (num_regs < 1)
/* Drops through. */
case BLKmode:
- if (type != (tree)0 && TYPE_ALIGN (type) > BITS_PER_WORD
+ if (type != (tree)0 && TYPE_ALIGN (type) > (unsigned) BITS_PER_WORD
&& ! TARGET_64BIT && mips_abi != ABI_EABI)
cum->arg_words += (cum->arg_words & 1);
regbase = GP_ARG_FIRST;
else
{
fprintf (file, "\tli\t%s,0x%.08lx\t# ",
- reg_names[MIPS_TEMP2_REGNUM], base_offset);
+ reg_names[MIPS_TEMP2_REGNUM], (long) base_offset);
fprintf (file, HOST_WIDE_INT_PRINT_DEC, base_offset);
fprintf (file, "\n\t%s\t%s,%s,%s\n",
Pmode == DImode ? "daddu" : "addu",
else
{
fprintf (file, "\tli\t%s,0x%.08lx\t# ",
- reg_names[MIPS_TEMP2_REGNUM], base_offset);
+ reg_names[MIPS_TEMP2_REGNUM], (long) base_offset);
fprintf (file, HOST_WIDE_INT_PRINT_DEC, base_offset);
fprintf (file, "\n\t%s\t%s,%s,%s\n",
Pmode == DImode ? "daddu" : "addu",
between pointers and any other objects of this machine mode. */
#ifndef Pmode
-#define Pmode (TARGET_LONG64 ? DImode : SImode)
+#define Pmode ((enum machine_mode)(TARGET_LONG64 ? DImode : SImode))
#endif
/* A function address in a call instruction
possibly excluding those that are used after they are set. */
regset *basic_block_significant;
register int i;
- rtx insn;
struct obstack flow_obstack;
int *argcp;
char ***argvp;
{
- int i, j, k;
+ int i;
int argc = *argcp;
char **argv = *argvp;
char **newv = (char **) xmalloc ((argc + 2) * 2 * sizeof (char *));
/* Translate -- options. */
if (argv[i][0] == '-' && argv[i][1] == '-')
{
+ size_t j;
/* Find a mapping that applies to this option. */
for (j = 0; j < sizeof (option_map) / sizeof (option_map[0]); j++)
{
if (arglen < optlen)
{
+ size_t k;
for (k = j + 1;
k < sizeof (option_map) / sizeof (option_map[0]);
k++)
}
old_spec = *(sl->ptr_spec);
- *(sl->ptr_spec) = ((spec[0] == '+' && ISSPACE (spec[1]))
+ *(sl->ptr_spec) = ((spec[0] == '+' && ISSPACE ((unsigned char)spec[1]))
? concat (old_spec, spec + 1, NULL_PTR)
: save_string (spec, strlen (spec)));
while (*p1 == ' ' || *p1 == '\t')
p1++;
- if (! ISALPHA (*p1))
+ if (! ISALPHA ((unsigned char)*p1))
fatal ("specs %%rename syntax malformed after %d characters",
p1 - buffer);
p2 = p1;
- while (*p2 && !ISSPACE (*p2))
+ while (*p2 && !ISSPACE ((unsigned char)*p2))
p2++;
if (*p2 != ' ' && *p2 != '\t')
while (*p2 == ' ' || *p2 == '\t')
p2++;
- if (! ISALPHA (*p2))
+ if (! ISALPHA ((unsigned char)*p2))
fatal ("specs %%rename syntax malformed after %d characters",
p2 - buffer);
/* Get new spec name */
p3 = p2;
- while (*p3 && !ISSPACE (*p3))
+ while (*p3 && !ISSPACE ((unsigned char)*p3))
p3++;
if (p3 != p-1)
if (gcc_exec_prefix)
{
int len = strlen (gcc_exec_prefix);
- if (len > sizeof ("/lib/gcc-lib/")-1
+ if (len > (int) sizeof ("/lib/gcc-lib/")-1
&& (gcc_exec_prefix[len-1] == '/'
|| gcc_exec_prefix[len-1] == DIR_SEPARATOR))
{
if (p[0] == '%' && p[1] == 'O')
{
/* We don't support extra suffix characters after %O. */
- if (*p == '.' || ISALPHA (*p))
+ if (*p == '.' || ISALPHA ((unsigned char)*p))
abort ();
suffix = OBJECT_SUFFIX;
suffix_length = strlen (OBJECT_SUFFIX);
}
else
{
- while (*p == '.' || ISALPHA (*p))
+ while (*p == '.' || ISALPHA ((unsigned char)*p))
p++;
suffix_length = p - suffix;
}
*x++ = *y++;
if (*y != '_'
- || (*(y+1) != '_' && ! ISUPPER (*(y+1))))
+ || (*(y+1) != '_'
+ && ! ISUPPER ((unsigned char)*(y+1))))
{
/* Stick __ at front of macro name. */
*x++ = '_';
y += 2;
if (*y != '_'
- || (*(y+1) != '_' && ! ISUPPER (*(y+1))))
+ || (*(y+1) != '_'
+ && ! ISUPPER ((unsigned char)*(y+1))))
{
/* Stick -D__ at front of macro name. */
*x++ = '-';
if (suffix)
{
int found = (input_suffix != 0
- && strlen (input_suffix) == p - filter
+ && (long) strlen (input_suffix) == (long)(p - filter)
&& strncmp (input_suffix, filter, p - filter) == 0);
if (body[0] == '}')
sizeof ("COLLECT_GCC_OPTIONS=")-1);
first_time = TRUE;
- for (i = 0; i < n_switches; i++)
+ for (i = 0; (int)i < n_switches; i++)
{
char **args;
char *p, *q;
/* Warn about any switches that no pass was interested in. */
- for (i = 0; i < n_switches; i++)
+ for (i = 0; (int)i < n_switches; i++)
if (! switches[i].valid)
error ("unrecognized option `-%s'", switches[i].part1);
explicit_link_files = xmalloc (n_infiles);
bzero (explicit_link_files, n_infiles);
- for (i = 0; i < n_infiles; i++)
+ for (i = 0; (int)i < n_infiles; i++)
{
register struct compiler *cp = 0;
int this_file_error = 0;
complain about input files to be given to the linker. */
if (! linker_was_run && error_count == 0)
- for (i = 0; i < n_infiles; i++)
+ for (i = 0; (int)i < n_infiles; i++)
if (explicit_link_files[i])
error ("%s: linker input file unused since linking not done",
outfiles[i]);
#include <stdio.h>
#include <sys/types.h>
-static int __fetch_long PROTO ((long *, char *, int));
+static int __fetch_long PROTO ((long *, char *, size_t));
static int __store_long PROTO ((long, char *, size_t));
static int __read_long PROTO ((long *, FILE *, size_t));
static int __write_long PROTO ((long, FILE *, size_t));
__fetch_long (dest, source, bytes)
long *dest;
char *source;
- int bytes;
+ size_t bytes;
{
long value = 0;
int i;
- for (i = bytes - 1; i > (sizeof (*dest) - 1); i--)
- if (source[i] & (i == (bytes - 1) ? 127 : 255 ))
+ for (i = bytes - 1; (size_t) i > (sizeof (*dest) - 1); i--)
+ if (source[i] & ((size_t) i == (bytes - 1) ? 127 : 255 ))
return 1;
for (; i >= 0; i--)
- value = value * 256 + (source[i] & (i == (bytes - 1) ? 127 : 255));
+ value = value * 256 + (source[i] & ((size_t)i == (bytes - 1) ? 127 : 255));
if ((source[bytes - 1] & 128) && (value > 0))
value = - value;
static char *attr_string PROTO((char *, int));
static rtx check_attr_test PROTO((rtx, int));
static rtx check_attr_value PROTO((rtx, struct attr_desc *));
-static rtx convert_set_attr_alternative PROTO((rtx, int, int, int));
-static rtx convert_set_attr PROTO((rtx, int, int, int));
+static rtx convert_set_attr_alternative PROTO((rtx, int, int));
+static rtx convert_set_attr PROTO((rtx, int, int));
static void check_defs PROTO((void));
#if 0
static rtx convert_const_symbol_ref PROTO((rtx, struct attr_desc *));
It becomes a COND with each test being (eq_attr "alternative "n") */
static rtx
-convert_set_attr_alternative (exp, num_alt, insn_code, insn_index)
+convert_set_attr_alternative (exp, num_alt, insn_index)
rtx exp;
int num_alt;
- int insn_code, insn_index;
+ int insn_index;
{
rtx condexp;
int i;
list of values is given, convert to SET_ATTR_ALTERNATIVE first. */
static rtx
-convert_set_attr (exp, num_alt, insn_code, insn_index)
+convert_set_attr (exp, num_alt, insn_index)
rtx exp;
int num_alt;
- int insn_code, insn_index;
+ int insn_index;
{
rtx newexp;
char *name_ptr;
while ((p = next_comma_elt (&name_ptr)) != NULL)
XVECEXP (newexp, 1, n++) = attr_rtx (CONST_STRING, p);
- return convert_set_attr_alternative (newexp, num_alt, insn_code, insn_index);
+ return convert_set_attr_alternative (newexp, num_alt, insn_index);
}
\f
/* Scan all definitions, checking for validity. Also, convert any SET_ATTR
case SET_ATTR_ALTERNATIVE:
value = convert_set_attr_alternative (value,
id->num_alternatives,
- id->insn_code,
id->insn_index);
break;
case SET_ATTR:
value = convert_set_attr (value, id->num_alternatives,
- id->insn_code, id->insn_index);
+ id->insn_index);
break;
default:
if (code == MATCH_OPERATOR || code == MATCH_PARALLEL)
{
- for (i = 0; i < XVECLEN (pattern, 2); i++)
+ for (i = 0; i < (size_t) XVECLEN (pattern, 2); i++)
{
newpos[depth] = i + (code == MATCH_OPERATOR ? '0': 'a');
new = add_to_sequence (XVECEXP (pattern, 2, i),
new->dupno = XINT (pattern, 0);
new->code = UNKNOWN;
new->tests = 0;
- for (i = 0; i < XVECLEN (pattern, 1); i++)
+ for (i = 0; i < (size_t) XVECLEN (pattern, 1); i++)
{
newpos[depth] = i + '0';
new = add_to_sequence (XVECEXP (pattern, 1, i),
fmt = GET_RTX_FORMAT (code);
len = GET_RTX_LENGTH (code);
- for (i = 0; i < len; i++)
+ for (i = 0; i < (size_t) len; i++)
{
newpos[depth] = '0' + i;
if (fmt[i] == 'e' || fmt[i] == 'u')
SET_HARD_REG_BIT (regs_used_so_far, i);
#endif
- for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
+ for (i = FIRST_PSEUDO_REGISTER; i < (size_t) max_regno; i++)
if (reg_renumber[i] >= 0)
SET_HARD_REG_BIT (regs_used_so_far, reg_renumber[i]);
reg_may_share[r2] = r1;
}
- for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
+ for (i = FIRST_PSEUDO_REGISTER; i < (size_t) max_regno; i++)
/* Note that reg_live_length[i] < 0 indicates a "constant" reg
that we are supposed to refrain from putting in a hard reg.
-2 means do make an allocno but don't allocate it. */
bzero ((char *) allocno_n_refs, max_allocno * sizeof (int));
bzero ((char *) allocno_live_length, max_allocno * sizeof (int));
- for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
+ for (i = FIRST_PSEUDO_REGISTER; i < (size_t) max_regno; i++)
if (reg_allocno[i] >= 0)
{
int allocno = reg_allocno[i];
override it. */
bzero ((char *) local_reg_live_length, sizeof local_reg_live_length);
bzero ((char *) local_reg_n_refs, sizeof local_reg_n_refs);
- for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
+ for (i = FIRST_PSEUDO_REGISTER; i < (size_t) max_regno; i++)
if (reg_renumber[i] >= 0)
{
int regno = reg_renumber[i];
So in either case, we can ignore the conflict. Likewise for
preferences. */
- for (i = 0; i < max_allocno; i++)
+ for (i = 0; i < (size_t) max_allocno; i++)
{
AND_COMPL_HARD_REG_SET (hard_reg_conflicts[i], eliminable_regset);
AND_COMPL_HARD_REG_SET (hard_reg_copy_preferences[i],
/* Determine the order to allocate the remaining pseudo registers. */
allocno_order = (int *) alloca (max_allocno * sizeof (int));
- for (i = 0; i < max_allocno; i++)
+ for (i = 0; i < (size_t) max_allocno; i++)
allocno_order[i] = i;
/* Default the size to 1, since allocno_compare uses it to divide by.
allocate it. So avoid the divide-by-zero and set it to a low
priority. */
- for (i = 0; i < max_allocno; i++)
+ for (i = 0; i < (size_t) max_allocno; i++)
{
if (allocno_size[i] == 0)
allocno_size[i] = 1;
/* Try allocating them, one by one, in that order,
except for parameters marked with reg_live_length[regno] == -2. */
- for (i = 0; i < max_allocno; i++)
+ for (i = 0; i < (size_t) max_allocno; i++)
if (reg_renumber[allocno_reg[allocno_order[i]]] < 0
&& REG_LIVE_LENGTH (allocno_reg[allocno_order[i]]) >= 0)
{
int
sets_cc0_p (x)
- rtx x;
+ rtx x ATTRIBUTE_UNUSED;
{
#ifdef HAVE_cc0
if (GET_CODE (x) == SET && SET_DEST (x) == cc0_rtx)
static void
validate_equiv_mem_from_store (dest, set)
rtx dest;
- rtx set;
+ rtx set ATTRIBUTE_UNUSED;
{
if ((GET_CODE (dest) == REG
&& reg_overlap_mentioned_p (dest, equiv_mem))
This is true of any register that can be eliminated. */
#ifdef ELIMINABLE_REGS
- for (i = 0; i < sizeof eliminables / sizeof eliminables[0]; i++)
+ for (i = 0; i < (int)(sizeof eliminables / sizeof eliminables[0]); i++)
SET_HARD_REG_BIT (used, eliminables[i].from);
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
/* If FRAME_POINTER_REGNUM is not a real register, then protect the one
register rtx *last_set = (rtx *) alloca (nregs * sizeof (rtx));
register rtx insn;
register int count = 0;
- register rtx dest;
bzero ((char *) last_set, nregs * sizeof (rtx));
for (insn = from; insn != to; insn = NEXT_INSN (insn))
int insn_count;
rtx loop_start;
rtx loop_end;
- int unroll_p, bct_p;
+ int unroll_p, bct_p ATTRIBUTE_UNUSED;
{
rtx p;
rtx set;
switch (code)
{
case LE:
- if (const_val != max_val >> 1)
+ if ((unsigned HOST_WIDE_INT) const_val != max_val >> 1)
code = LT, op1 = GEN_INT (const_val + 1);
break;
/* When cross-compiling, const_val might be sign-extended from
BITS_PER_WORD to HOST_BITS_PER_WIDE_INT */
case GE:
- if ((const_val & max_val)
+ if ((HOST_WIDE_INT) (const_val & max_val)
!= (((HOST_WIDE_INT) 1
<< (GET_MODE_BITSIZE (GET_MODE (op0)) - 1))))
code = GT, op1 = GEN_INT (const_val - 1);
static int
insert_loop_mem (mem, data)
rtx *mem;
- void *data;
+ void *data ATTRIBUTE_UNUSED;
{
int i;
rtx m = *mem;
old_nregs = nregs;
nregs = max_reg_num ();
- if (nregs > n_times_set->num_elements)
+ if ((unsigned) nregs > n_times_set->num_elements)
{
/* Grow all the arrays. */
VARRAY_GROW (n_times_set, nregs);
static int
is_id_char (ch)
- char ch;
+ unsigned char ch;
{
return (ISALNUM (ch) || (ch == '_') || (ch == '$'));
}
temp_params[param_count++] = compiler_file_name;
for (;;)
{
- while (ISSPACE (*params_list))
+ while (ISSPACE ((const unsigned char)*params_list))
params_list++;
if (!*params_list)
break;
param = params_list;
- while (*params_list && !ISSPACE (*params_list))
+ while (*params_list && !ISSPACE ((const unsigned char)*params_list))
params_list++;
if (param[0] != '-')
temp_params[param_count++]
case 'c':
break; /* Don't copy these. */
case 'o':
- while (ISSPACE (*params_list))
+ while (ISSPACE ((const unsigned char)*params_list))
params_list++;
- while (*params_list && !ISSPACE (*params_list))
+ while (*params_list
+ && !ISSPACE ((const unsigned char)*params_list))
params_list++;
break;
default:
/* Read the aux_info file into memory. */
- if (safe_read (aux_info_file, aux_info_base, aux_info_size) != aux_info_size)
+ if (safe_read (aux_info_file, aux_info_base, aux_info_size) !=
+ (int) aux_info_size)
{
int errno_val = errno;
fprintf (stderr, "%s: error reading aux info file `%s': %s\n",
forward_to_next_token_char (ptr)
const char *ptr;
{
- for (++ptr; ISSPACE (*ptr); check_source (++ptr < clean_text_limit, 0))
+ for (++ptr; ISSPACE ((const unsigned char)*ptr);
+ check_source (++ptr < clean_text_limit, 0))
continue;
return ptr;
}
next_end = start_formals - 1;
check_source (next_end > clean_read_ptr, 0);
- while (ISSPACE (*next_end))
+ while (ISSPACE ((const unsigned char)*next_end))
check_source (--next_end > clean_read_ptr, 0);
check_source (*next_end == ')', next_end);
check_source (--next_end > clean_read_ptr, 0);
const char *func_name_limit;
size_t func_name_len;
- for (func_name_limit = start_formals-1; ISSPACE (*func_name_limit); )
+ for (func_name_limit = start_formals-1;
+ ISSPACE ((const unsigned char)*func_name_limit); )
check_source (--func_name_limit > clean_read_ptr, 0);
for (func_name_start = func_name_limit++;
while (*end_formals != ')')
{
- if (ISSPACE (*end_formals))
- while (ISSPACE (*end_formals))
+ if (ISSPACE ((const unsigned char)*end_formals))
+ while (ISSPACE ((const unsigned char)*end_formals))
check_source (--end_formals > clean_read_ptr, 0);
else
check_source (--end_formals > clean_read_ptr, 0);
by an alphabetic character, while others *cannot* validly be followed
by such characters. */
- if ((ch == '{') || ISALPHA (ch))
+ if ((ch == '{') || ISALPHA ((unsigned char)ch))
break;
/* At this point, we have found a right paren, but we know that it is
We can now just scan backwards and find the left end of the existing
indentation string, and then copy it to the output buffer. */
- for (sp = ep; ISSPACE (*sp) && *sp != '\n'; sp--)
+ for (sp = ep; ISSPACE ((const unsigned char)*sp) && *sp != '\n'; sp--)
continue;
/* Now write out the open { which began this block, and any following
header. We will put in the added declarations just prior to that. */
scan_p++;
- while (ISSPACE (*scan_p))
+ while (ISSPACE ((const unsigned char)*scan_p))
scan_p++;
scan_p--;
{
have_newlines |= (*scan_orig == '\n');
/* Leave identical whitespace alone. */
- if (!ISSPACE (*scan_orig))
+ if (!ISSPACE ((const unsigned char)*scan_orig))
*((NONCONST char *)scan_orig) = ' '; /* identical - so whiteout */
}
else
scan_p += 2;
while (scan_p[1] != '/' || scan_p[0] != '*')
{
- if (!ISSPACE (*scan_p))
+ if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
if (++scan_p >= new_clean_text_limit)
abort ();
*scan_p = ' ';
while (scan_p[1] != '\n' || scan_p[0] == '\\')
{
- if (!ISSPACE (*scan_p))
+ if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
if (++scan_p >= new_clean_text_limit)
abort ();
non_whitespace_since_newline = 1;
while (scan_p[1] != '\'' || scan_p[0] == '\\')
{
- if (scan_p[0] == '\\' && !ISSPACE (scan_p[1]))
+ if (scan_p[0] == '\\'
+ && !ISSPACE ((const unsigned char)scan_p[1]))
scan_p[1] = ' ';
- if (!ISSPACE (*scan_p))
+ if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
if (++scan_p >= new_clean_text_limit)
abort ();
non_whitespace_since_newline = 1;
while (scan_p[1] != '"' || scan_p[0] == '\\')
{
- if (scan_p[0] == '\\' && !ISSPACE (scan_p[1]))
+ if (scan_p[0] == '\\'
+ && !ISSPACE ((const unsigned char)scan_p[1]))
scan_p[1] = ' ';
- if (!ISSPACE (*scan_p))
+ if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
if (++scan_p >= new_clean_text_limit)
abort ();
}
- if (!ISSPACE (*scan_p))
+ if (!ISSPACE ((const unsigned char)*scan_p))
*scan_p = ' ';
scan_p++;
break;
last_r_paren = scan_p;
- for (ahead_p = scan_p + 1; ISSPACE (*ahead_p); )
+ for (ahead_p = scan_p + 1; ISSPACE ((const unsigned char)*ahead_p); )
check_source (++ahead_p < limit, limit);
scan_p = ahead_p - 1;
- if (ISALPHA (*ahead_p) || *ahead_p == '{')
+ if (ISALPHA ((const unsigned char)*ahead_p) || *ahead_p == '{')
{
const char *last_l_paren;
const int lineno = identify_lineno (ahead_p);
do
{
last_l_paren = careful_find_l_paren (last_r_paren);
- for (last_r_paren = last_l_paren-1; ISSPACE (*last_r_paren); )
+ for (last_r_paren = last_l_paren-1;
+ ISSPACE ((const unsigned char)*last_r_paren); )
check_source (--last_r_paren >= backup_limit, backup_limit);
}
while (*last_r_paren == ')');
in one swell fwoop. Then figure out where the end of the text is and
make sure that it ends with a newline followed by a null. */
- if (safe_read (input_file, new_orig_text_base, orig_size) != orig_size)
+ if (safe_read (input_file, new_orig_text_base, orig_size) !=
+ (int) orig_size)
{
int errno_val = errno;
close (input_file);
{
const char *cp;
- for (cp = varargs_style_indicator; ISALNUM (*cp) || *cp == '_'; cp++)
+ for (cp = varargs_style_indicator;
+ ISALNUM ((const unsigned char)*cp) || *cp == '_'; cp++)
continue;
if (*cp != 0)
varargs_style_indicator = savestring (varargs_style_indicator,
int
const_int_operand (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return GET_CODE (op) == CONST_INT;
}
enum machine_mode mode = modes[i];
int allows_mem = 0;
int win = 0;
- char c;
+ unsigned char c;
/* If this operand has no constraints at all, we can conclude
nothing about it since anything is valid. */
if (prefclass)
alt_cost
- += may_move_cost[prefclass[REGNO (op)]][(int) classes[i]];
+ += may_move_cost[(unsigned char)prefclass[REGNO (op)]][(int) classes[i]];
}
}
int nr;
if (regno >= FIRST_PSEUDO_REGISTER && prefclass != 0
- && (reg_class_size[prefclass[regno]]
+ && (reg_class_size[(unsigned char)prefclass[regno]]
== CLASS_MAX_NREGS (prefclass[regno], mode)))
- op_costs[i].cost[prefclass[regno]] = -1;
+ op_costs[i].cost[(unsigned char)prefclass[regno]] = -1;
else if (regno < FIRST_PSEUDO_REGISTER)
for (class = 0; class < N_REG_CLASSES; class++)
if (TEST_HARD_REG_BIT (reg_class_contents[class], regno)
char insn_letter = insn_operand_constraint[(int) icode][!in_p][in_p];
enum reg_class insn_class
= (insn_letter == 'r' ? GENERAL_REGS
- : REG_CLASS_FROM_LETTER (insn_letter));
+ : REG_CLASS_FROM_LETTER ((unsigned char) insn_letter));
if (insn_class == NO_REGS
|| (in_p && insn_operand_constraint[(int) icode][!in_p][0] != '=')
class = insn_class;
t_mode = insn_operand_mode[(int) icode][2];
t_class = (t_letter == 'r' ? GENERAL_REGS
- : REG_CLASS_FROM_LETTER (t_letter));
+ : REG_CLASS_FROM_LETTER ((unsigned char) t_letter));
t_icode = icode;
icode = CODE_FOR_nothing;
}
}
else if (size == 1)
{
- this_needs->regs[reload_nongroup[i]][(int) class] += 1;
+ this_needs->regs[(unsigned char)reload_nongroup[i]][(int) class] += 1;
p = reg_class_superclasses[(int) class];
while (*p != LIM_REG_CLASSES)
- this_needs->regs[reload_nongroup[i]][(int) *p++] += 1;
+ this_needs->regs[(unsigned char)reload_nongroup[i]][(int) *p++] += 1;
}
else
abort ();
{
enum rtx_code code = GET_CODE (x);
rtx tem;
- int i;
+ unsigned int i;
struct elim_table *p;
switch (code)
offsets. We want the first field for ADDR_VEC and the second
field for ADDR_DIFF_VEC. */
- for (i = 0; i < XVECLEN (x, code == ADDR_DIFF_VEC); i++)
+ for (i = 0; i < (unsigned) XVECLEN (x, code == ADDR_DIFF_VEC); i++)
set_label_offsets (XVECEXP (x, code == ADDR_DIFF_VEC, i),
insn, initial_p);
return;
rtx dest;
rtx x;
{
- register int i;
+ register unsigned int i;
/* A SUBREG of a hard register here is just changing its mode. We should
not see a SUBREG of an eliminable hard register, but check just in
static void
order_regs_for_reload ()
{
- register int i;
+ register unsigned int i;
register int o = 0;
int large = 0;
hard_reg_n_uses[i].regno = i;
}
- for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
+ for (i = FIRST_PSEUDO_REGISTER; i < (unsigned) max_regno; i++)
{
int regno = reg_renumber[i];
if (regno >= 0)
/* Reset all offsets on eliminable registers to their initial values. */
#ifdef ELIMINABLE_REGS
- for (i = 0; i < NUM_ELIMINABLE_REGS; i++)
+ for (i = 0; i < (int) NUM_ELIMINABLE_REGS; i++)
{
INITIAL_ELIMINATION_OFFSET (reg_eliminate[i].from, reg_eliminate[i].to,
reg_eliminate[i].initial_offset);
if (GET_CODE (insn) == CODE_LABEL)
{
num_not_at_initial_offset = 0;
- for (i = 0; i < NUM_ELIMINABLE_REGS; i++)
+ for (i = 0; i < (int) NUM_ELIMINABLE_REGS; i++)
{
reg_eliminate[i].offset = reg_eliminate[i].previous_offset
= offsets_at[CODE_LABEL_NUMBER (insn)][i];
if (j == n_reloads)
break;
+#if 0
fail:
+#endif
/* Loop around and try without any inheritance. */
/* First undo everything done by the failed attempt
to allocate with inheritance. */
default:
class
- = reg_class_subunion[(int) class][(int) REG_CLASS_FROM_LETTER (c)];
+ = reg_class_subunion[(int) class][(int) REG_CLASS_FROM_LETTER ((unsigned char)c)];
break;
case ',': case '\0':
The second argument, SET, is ignored. */
static void
reload_combine_note_store (dst, set)
- rtx dst, set;
+ rtx dst, set ATTRIBUTE_UNUSED;
{
int regno = 0;
int i;
regno += REGNO (dst);
/* note_stores might have stripped a STRICT_LOW_PART, so we have to be
careful with registers / register parts that are not full words. */
- if (size < UNITS_PER_WORD)
+ if (size < (unsigned) UNITS_PER_WORD)
reg_state[regno].use_index = -1;
else
{
&& XEXP (SET_SRC (set), 0) == reg
&& GET_CODE (XEXP (SET_SRC (set), 1)) == CONST_INT)
{
- rtx src2 = SET_SRC (set);
rtx src3 = XEXP (SET_SRC (set), 1);
rtx new_src = GEN_INT (INTVAL (src3)
- INTVAL (reg_offset[regno]));
#include "flags.h"
#include "insn-config.h"
#include "insn-attr.h"
+#include "recog.h"
#ifndef INSN_SCHEDULING
void
static void sched_analyze_2 PROTO((rtx, rtx));
static void sched_analyze_insn PROTO((rtx, rtx, rtx));
static int sched_analyze PROTO((rtx, rtx));
-static void sched_note_set PROTO((int, rtx, int));
+static void sched_note_set PROTO((rtx, int));
static int rank_for_schedule PROTO((const GENERIC_PTR, const GENERIC_PTR));
static void swap_sort PROTO((rtx *, int));
static void queue_insn PROTO((rtx, int));
static rtx reemit_notes PROTO((rtx, rtx));
static void schedule_block PROTO((int, FILE *));
static rtx regno_use_in PROTO((int, rtx));
-static void split_hard_reg_notes PROTO((rtx, rtx, rtx, rtx));
+static void split_hard_reg_notes PROTO((rtx, rtx, rtx));
static void new_insn_dead_notes PROTO((rtx, rtx, rtx, rtx));
static void update_n_sets PROTO((rtx, int));
static void update_flow_info PROTO((rtx, rtx, rtx, rtx));
unsigned int blockage = INSN_BLOCKAGE (insn);
unsigned int range;
- if (UNIT_BLOCKED (blockage) != unit + 1)
+ if ((int) UNIT_BLOCKED (blockage) != unit + 1)
{
range = function_units[unit].blockage_range_function (insn);
/* We only cache the blockage range for one unit and then only if
are scanning forwards. Mark that register as being born. */
static void
-sched_note_set (b, x, death)
- int b;
+sched_note_set (x, death)
rtx x;
int death;
{
a register must be marked as dead after this insn. */
if (GET_CODE (PATTERN (insn)) == SET
|| GET_CODE (PATTERN (insn)) == CLOBBER)
- sched_note_set (b, PATTERN (insn), 0);
+ sched_note_set (PATTERN (insn), 0);
else if (GET_CODE (PATTERN (insn)) == PARALLEL)
{
int j;
for (j = XVECLEN (PATTERN (insn), 0) - 1; j >= 0; j--)
if (GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == SET
|| GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == CLOBBER)
- sched_note_set (b, XVECEXP (PATTERN (insn), 0, j), 0);
+ sched_note_set (XVECEXP (PATTERN (insn), 0, j), 0);
/* ??? This code is obsolete and should be deleted. It
is harmless though, so we will leave it in for now. */
for (j = XVECLEN (PATTERN (insn), 0) - 1; j >= 0; j--)
if (GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == USE)
- sched_note_set (b, XVECEXP (PATTERN (insn), 0, j), 0);
+ sched_note_set (XVECEXP (PATTERN (insn), 0, j), 0);
}
/* Each call clobbers (makes live) all call-clobbered regs
must be marked as dead after this insn. */
if (GET_CODE (PATTERN (insn)) == SET
|| GET_CODE (PATTERN (insn)) == CLOBBER)
- sched_note_set (b, PATTERN (insn), 0);
+ sched_note_set (PATTERN (insn), 0);
else if (GET_CODE (PATTERN (insn)) == PARALLEL)
{
int j;
for (j = XVECLEN (PATTERN (insn), 0) - 1; j >= 0; j--)
if (GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == SET
|| GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == CLOBBER)
- sched_note_set (b, XVECEXP (PATTERN (insn), 0, j), 0);
+ sched_note_set (XVECEXP (PATTERN (insn), 0, j), 0);
/* ??? This code is obsolete and should be deleted. It
is harmless though, so we will leave it in for now. */
for (j = XVECLEN (PATTERN (insn), 0) - 1; j >= 0; j--)
if (GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == USE)
- sched_note_set (b, XVECEXP (PATTERN (insn), 0, j), 0);
+ sched_note_set (XVECEXP (PATTERN (insn), 0, j), 0);
}
/* Each call clobbers (makes live) all call-clobbered regs that are
/* See if this is the last notice we must take of a register. */
if (GET_CODE (PATTERN (insn)) == SET
|| GET_CODE (PATTERN (insn)) == CLOBBER)
- sched_note_set (b, PATTERN (insn), 1);
+ sched_note_set (PATTERN (insn), 1);
else if (GET_CODE (PATTERN (insn)) == PARALLEL)
{
int j;
for (j = XVECLEN (PATTERN (insn), 0) - 1; j >= 0; j--)
if (GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == SET
|| GET_CODE (XVECEXP (PATTERN (insn), 0, j)) == CLOBBER)
- sched_note_set (b, XVECEXP (PATTERN (insn), 0, j), 1);
+ sched_note_set (XVECEXP (PATTERN (insn), 0, j), 1);
}
/* This code keeps life analysis information up to date. */
several smaller hard register references in the split insns. */
static void
-split_hard_reg_notes (note, first, last, orig_insn)
- rtx note, first, last, orig_insn;
+split_hard_reg_notes (note, first, last)
+ rtx note, first, last;
{
rtx reg, temp, link;
int n_regs, i, new_reg;
&& GET_CODE (temp) == REG
&& REGNO (temp) < FIRST_PSEUDO_REGISTER
&& HARD_REGNO_NREGS (REGNO (temp), GET_MODE (temp)) > 1)
- split_hard_reg_notes (note, first, last, orig_insn);
+ split_hard_reg_notes (note, first, last);
else
{
XEXP (note, 1) = REG_NOTES (insn);
enum reg_class class;
enum machine_mode mode;
int born_insn, dead_insn;
- int changes_size;
+ int changes_size ATTRIBUTE_UNUSED;
{
register int i, ins;
#ifdef HARD_REG_SET
call_preserved ? call_used_reg_set : fixed_reg_set);
#ifdef ELIMINABLE_REGS
- for (i = 0; i < sizeof eliminables / sizeof eliminables[0]; i++)
+ for (i = 0; i < (int)(sizeof eliminables / sizeof eliminables[0]); i++)
SET_HARD_REG_BIT (used, eliminables[i].from);
#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
SET_HARD_REG_BIT (used, HARD_FRAME_POINTER_REGNUM);
/* Forward declarations. */
static void init_reg_map PROTO((struct inline_remap *, int));
-static int precondition_loop_p PROTO((rtx *, rtx *, rtx *, rtx, rtx));
+static int precondition_loop_p PROTO((rtx *, rtx *, rtx *, rtx));
static rtx calculate_giv_inc PROTO((rtx, rtx, int));
static rtx initial_reg_note_copy PROTO((rtx, struct inline_remap *));
static void final_reg_note_copy PROTO((rtx, struct inline_remap *));
rtx initial_value, final_value, increment;
if (precondition_loop_p (&initial_value, &final_value, &increment,
- loop_start, loop_end))
+ loop_start))
{
register rtx diff ;
enum machine_mode mode;
whether divide is cheap. */
static int
-precondition_loop_p (initial_value, final_value, increment, loop_start,
- loop_end)
+precondition_loop_p (initial_value, final_value, increment, loop_start)
rtx *initial_value, *final_value, *increment;
- rtx loop_start, loop_end;
+ rtx loop_start;
{
if (loop_n_iterations > 0)