Commit 5197bd50 by Richard Kenner Committed by Richard Kenner

alias.c (clear_reg_alias_info): Use K&R format definition.

	* alias.c (clear_reg_alias_info): Use K&R format definition.
	Avoid unsigned warning.
	* builtins.c: Use "unsigned int", not "unsigned".
	(target_char_cast): Use host_integerp and tree_low_cst.
	(expand_builtin_args_info, expand_builtin_frame_address): Likewise.
	(c_strlen): Likewise; OFFSET now HOST_WIDE_INT.
	(c_getstr): Likewise.
	(std_expand_builtin_va_arg): Use int_size_in_bytes.
	(builtin_memcpy_read_str): Avoid unsigned warning.
	(expand_builtin_memcpy): Alignments are unsigned.
	(expand_builtin_strncpy, expand_builtin_memset): Likewise.
	(expand_builtin_expect_jump): Use integer_zerop and integer_onep.
	* predict.c (expensive_function_p): LIMIT now unsigned.
	* resource.c (mark_target_live_regs): Make some vars unsigned.
	* sdbout.c: Use "unsigned int", not "unsigned".
	(MAKE_LINE_SAFE): Add cast to avoid unsigned warning.
	(sdbout_source_line): Likewise.
	(sdbout_record_type_name): Remove "const" for NAME declaration.
	* config/alpha/alpha.c (alpha_expand_block_move): Whitespace fixes.

From-SVN: r45503
parent 2e547b13
Mon Sep 10 06:47:35 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* alias.c (clear_reg_alias_info): Use K&R format definition.
Avoid unsigned warning.
* builtins.c: Use "unsigned int", not "unsigned".
(target_char_cast): Use host_integerp and tree_low_cst.
(expand_builtin_args_info, expand_builtin_frame_address): Likewise.
(c_strlen): Likewise; OFFSET now HOST_WIDE_INT.
(c_getstr): Likewise.
(std_expand_builtin_va_arg): Use int_size_in_bytes.
(builtin_memcpy_read_str): Avoid unsigned warning.
(expand_builtin_memcpy): Alignments are unsigned.
(expand_builtin_strncpy, expand_builtin_memset): Likewise.
(expand_builtin_expect_jump): Use integer_zerop and integer_onep.
* predict.c (expensive_function_p): LIMIT now unsigned.
* resource.c (mark_target_live_regs): Make some vars unsigned.
* sdbout.c: Use "unsigned int", not "unsigned".
(MAKE_LINE_SAFE): Add cast to avoid unsigned warning.
(sdbout_source_line): Likewise.
(sdbout_record_type_name): Remove "const" for NAME declaration.
* config/alpha/alpha.c (alpha_expand_block_move): Whitespace fixes.
2001-09-10 Richard Sandiford <rsandifo@redhat.com> 2001-09-10 Richard Sandiford <rsandifo@redhat.com>
* calls.c (store_one_arg): Expand comment. * calls.c (store_one_arg): Expand comment.
......
...@@ -966,12 +966,11 @@ record_base_value (regno, val, invariant) ...@@ -966,12 +966,11 @@ record_base_value (regno, val, invariant)
changes the offset. */ changes the offset. */
void void
clear_reg_alias_info (rtx reg) clear_reg_alias_info (reg)
rtx reg;
{ {
int regno = REGNO (reg); if (REGNO (reg) < reg_known_value_size)
reg_known_value[REGNO (reg)] = reg;
if (regno < reg_known_value_size)
reg_known_value[regno] = reg;
} }
/* Returns a canonical version of X, from the point of view alias /* Returns a canonical version of X, from the point of view alias
......
...@@ -3599,7 +3599,7 @@ alpha_expand_block_move (operands) ...@@ -3599,7 +3599,7 @@ alpha_expand_block_move (operands)
if (mode == TImode) if (mode == TImode)
{ {
data_regs[nregs] = gen_lowpart (DImode, tmp); data_regs[nregs] = gen_lowpart (DImode, tmp);
data_regs[nregs+1] = gen_highpart (DImode, tmp); data_regs[nregs + 1] = gen_highpart (DImode, tmp);
nregs += 2; nregs += 2;
} }
else else
...@@ -3620,7 +3620,7 @@ alpha_expand_block_move (operands) ...@@ -3620,7 +3620,7 @@ alpha_expand_block_move (operands)
words = bytes / 8; words = bytes / 8;
for (i = 0; i < words; ++i) for (i = 0; i < words; ++i)
data_regs[nregs + i] = gen_reg_rtx(DImode); data_regs[nregs + i] = gen_reg_rtx (DImode);
for (i = 0; i < words; ++i) for (i = 0; i < words; ++i)
emit_move_insn (data_regs[nregs + i], emit_move_insn (data_regs[nregs + i],
...@@ -3636,7 +3636,7 @@ alpha_expand_block_move (operands) ...@@ -3636,7 +3636,7 @@ alpha_expand_block_move (operands)
words = bytes / 4; words = bytes / 4;
for (i = 0; i < words; ++i) for (i = 0; i < words; ++i)
data_regs[nregs + i] = gen_reg_rtx(SImode); data_regs[nregs + i] = gen_reg_rtx (SImode);
for (i = 0; i < words; ++i) for (i = 0; i < words; ++i)
emit_move_insn (data_regs[nregs + i], emit_move_insn (data_regs[nregs + i],
...@@ -3652,7 +3652,7 @@ alpha_expand_block_move (operands) ...@@ -3652,7 +3652,7 @@ alpha_expand_block_move (operands)
words = bytes / 8; words = bytes / 8;
for (i = 0; i < words+1; ++i) for (i = 0; i < words+1; ++i)
data_regs[nregs + i] = gen_reg_rtx(DImode); data_regs[nregs + i] = gen_reg_rtx (DImode);
alpha_expand_unaligned_load_words (data_regs + nregs, orig_src, alpha_expand_unaligned_load_words (data_regs + nregs, orig_src,
words, ofs); words, ofs);
......
...@@ -793,7 +793,7 @@ expensive_function_p (threshold) ...@@ -793,7 +793,7 @@ expensive_function_p (threshold)
{ {
unsigned int sum = 0; unsigned int sum = 0;
int i; int i;
int limit; unsigned int limit;
/* We can not compute accurately for large thresholds due to scaled /* We can not compute accurately for large thresholds due to scaled
frequencies. */ frequencies. */
......
...@@ -891,7 +891,7 @@ mark_target_live_regs (insns, target, res) ...@@ -891,7 +891,7 @@ mark_target_live_regs (insns, target, res)
struct resources *res; struct resources *res;
{ {
int b = -1; int b = -1;
int i; unsigned int i;
struct target_info *tinfo = NULL; struct target_info *tinfo = NULL;
rtx insn; rtx insn;
rtx jump_insn = 0; rtx jump_insn = 0;
...@@ -949,7 +949,8 @@ mark_target_live_regs (insns, target, res) ...@@ -949,7 +949,8 @@ mark_target_live_regs (insns, target, res)
tinfo = (struct target_info *) xmalloc (sizeof (struct target_info)); tinfo = (struct target_info *) xmalloc (sizeof (struct target_info));
tinfo->uid = INSN_UID (target); tinfo->uid = INSN_UID (target);
tinfo->block = b; tinfo->block = b;
tinfo->next = target_hash_table[INSN_UID (target) % TARGET_HASH_PRIME]; tinfo->next
= target_hash_table[INSN_UID (target) % TARGET_HASH_PRIME];
target_hash_table[INSN_UID (target) % TARGET_HASH_PRIME] = tinfo; target_hash_table[INSN_UID (target) % TARGET_HASH_PRIME] = tinfo;
} }
} }
...@@ -1061,8 +1062,8 @@ mark_target_live_regs (insns, target, res) ...@@ -1061,8 +1062,8 @@ mark_target_live_regs (insns, target, res)
&& GET_CODE (XEXP (link, 0)) == REG && GET_CODE (XEXP (link, 0)) == REG
&& REGNO (XEXP (link, 0)) < FIRST_PSEUDO_REGISTER) && REGNO (XEXP (link, 0)) < FIRST_PSEUDO_REGISTER)
{ {
int first_regno = REGNO (XEXP (link, 0)); unsigned int first_regno = REGNO (XEXP (link, 0));
int last_regno unsigned int last_regno
= (first_regno = (first_regno
+ HARD_REGNO_NREGS (first_regno, + HARD_REGNO_NREGS (first_regno,
GET_MODE (XEXP (link, 0)))); GET_MODE (XEXP (link, 0))));
...@@ -1080,8 +1081,8 @@ mark_target_live_regs (insns, target, res) ...@@ -1080,8 +1081,8 @@ mark_target_live_regs (insns, target, res)
&& GET_CODE (XEXP (link, 0)) == REG && GET_CODE (XEXP (link, 0)) == REG
&& REGNO (XEXP (link, 0)) < FIRST_PSEUDO_REGISTER) && REGNO (XEXP (link, 0)) < FIRST_PSEUDO_REGISTER)
{ {
int first_regno = REGNO (XEXP (link, 0)); unsigned int first_regno = REGNO (XEXP (link, 0));
int last_regno unsigned int last_regno
= (first_regno = (first_regno
+ HARD_REGNO_NREGS (first_regno, + HARD_REGNO_NREGS (first_regno,
GET_MODE (XEXP (link, 0)))); GET_MODE (XEXP (link, 0))));
......
...@@ -94,10 +94,10 @@ extern tree current_function_decl; ...@@ -94,10 +94,10 @@ extern tree current_function_decl;
static void sdbout_init PARAMS ((const char *)); static void sdbout_init PARAMS ((const char *));
static void sdbout_finish PARAMS ((const char *)); static void sdbout_finish PARAMS ((const char *));
static void sdbout_start_source_file PARAMS ((unsigned, const char *)); static void sdbout_start_source_file PARAMS ((unsigned int, const char *));
static void sdbout_end_source_file PARAMS ((unsigned)); static void sdbout_end_source_file PARAMS ((unsigned int));
static void sdbout_begin_block PARAMS ((unsigned, unsigned)); static void sdbout_begin_block PARAMS ((unsigned int, unsigned int));
static void sdbout_end_block PARAMS ((unsigned, unsigned)); static void sdbout_end_block PARAMS ((unsigned int, unsigned int));
static void sdbout_source_line PARAMS ((unsigned int, const char *)); static void sdbout_source_line PARAMS ((unsigned int, const char *));
static void sdbout_end_epilogue PARAMS ((void)); static void sdbout_end_epilogue PARAMS ((void));
static void sdbout_global_decl PARAMS ((tree)); static void sdbout_global_decl PARAMS ((tree));
...@@ -263,7 +263,8 @@ do { fprintf (asm_out_file, "\t.tag\t"); \ ...@@ -263,7 +263,8 @@ do { fprintf (asm_out_file, "\t.tag\t"); \
/* Ensure we don't output a negative line number. */ /* Ensure we don't output a negative line number. */
#define MAKE_LINE_SAFE(line) \ #define MAKE_LINE_SAFE(line) \
if (line <= sdb_begin_function_line) line = sdb_begin_function_line + 1 if ((int) line <= sdb_begin_function_line) \
line = sdb_begin_function_line + 1
/* Perform linker optimization of merging header file definitions together /* Perform linker optimization of merging header file definitions together
for targets with MIPS_DEBUGGING_INFO defined. This won't work without a for targets with MIPS_DEBUGGING_INFO defined. This won't work without a
...@@ -439,7 +440,7 @@ static void ...@@ -439,7 +440,7 @@ static void
sdbout_record_type_name (type) sdbout_record_type_name (type)
tree type; tree type;
{ {
const char *name = 0; char *name = 0;
int no_name; int no_name;
if (KNOWN_TYPE_TAG (type)) if (KNOWN_TYPE_TAG (type))
...@@ -1606,7 +1607,7 @@ sdbout_source_line (line, filename) ...@@ -1606,7 +1607,7 @@ sdbout_source_line (line, filename)
const char *filename ATTRIBUTE_UNUSED; const char *filename ATTRIBUTE_UNUSED;
{ {
/* COFF relative line numbers must be positive. */ /* COFF relative line numbers must be positive. */
if (line > sdb_begin_function_line) if ((int) line > sdb_begin_function_line)
{ {
#ifdef ASM_OUTPUT_SOURCE_LINE #ifdef ASM_OUTPUT_SOURCE_LINE
ASM_OUTPUT_SOURCE_LINE (asm_out_file, line); ASM_OUTPUT_SOURCE_LINE (asm_out_file, line);
......
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