Commit e2bef702 by Richard Henderson

dwarf2out.c (dwarf2out_line): Constify `lastfile'.

        * dwarf2out.c (dwarf2out_line): Constify `lastfile'.
        * except.c (expand_rethrow): Remove unused variable.
        * expr.c (do_jump_by_parts_greater_rtx): Likewise.
        * flow.c (replace_insns): Likewise.
        (create_edge_list, verify_edge_list): Likewise.
        * gcse.c (cprop_cc0_jump): Protect declaration with HAVE_cc0.

        * genemit.c (gen_expand): Only emit `operands[N]' decl if there
        is special code to run.
        (main): Don't define operands to emit_operand.
        * genrecog.c (main): Don't emit an empty peephole2_insn function.

        * rtl.h (NOTE_BASIC_BLOCK): Use X0BBDEF.

        * alpha/alpha.h (normal_memory_operand): Declare.
        (reg_no_subreg_operand): Declare.
        * alpha/elf.h (ASM_DECLARE_OBJECT_NAME): Use HOST_WIDE_INT_PRINT_DEC.

From-SVN: r29061
parent ec4f972f
...@@ -2549,6 +2549,8 @@ extern int call_operand (); ...@@ -2549,6 +2549,8 @@ extern int call_operand ();
extern int reg_or_cint_operand (); extern int reg_or_cint_operand ();
extern int hard_fp_register_operand (); extern int hard_fp_register_operand ();
extern int reg_not_elim_operand (); extern int reg_not_elim_operand ();
extern int normal_memory_operand ();
extern int reg_no_subreg_operand ();
extern void alpha_set_memflags (); extern void alpha_set_memflags ();
extern int aligned_memory_operand (); extern int aligned_memory_operand ();
extern void get_aligned_mem (); extern void get_aligned_mem ();
......
...@@ -417,18 +417,23 @@ void FN () \ ...@@ -417,18 +417,23 @@ void FN () \
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
do { \ do { \
HOST_WIDE_INT size; \
fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
assemble_name (FILE, NAME); \ assemble_name (FILE, NAME); \
putc (',', FILE); \ putc (',', FILE); \
fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
putc ('\n', FILE); \ putc ('\n', FILE); \
size_directive_output = 0; \ size_directive_output = 0; \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ if (!flag_inhibit_size_directive \
&& DECL_SIZE (DECL) \
&& (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \
{ \ { \
size_directive_output = 1; \ size_directive_output = 1; \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, NAME); \ assemble_name (FILE, NAME); \
fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ fputc (',', FILE); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, size); \
fputc ('\n', FILE); \
} \ } \
ASM_OUTPUT_LABEL(FILE, NAME); \ ASM_OUTPUT_LABEL(FILE, NAME); \
} while (0) } while (0)
...@@ -440,22 +445,24 @@ void FN () \ ...@@ -440,22 +445,24 @@ void FN () \
by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
do { \ do { \
char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ HOST_WIDE_INT size; \
if (!flag_inhibit_size_directive \
&& DECL_SIZE (DECL) \
&& ! AT_END && TOP_LEVEL \ && ! AT_END && TOP_LEVEL \
&& DECL_INITIAL (DECL) == error_mark_node \ && DECL_INITIAL (DECL) == error_mark_node \
&& !size_directive_output) \ && !size_directive_output \
&& (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0) \
{ \ { \
size_directive_output = 1; \ size_directive_output = 1; \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, name); \ assemble_name (FILE, name); \
putc (',', FILE); \ fputc (',', FILE); \
fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, size); \
int_size_in_bytes (TREE_TYPE (DECL))); \ fputc ('\n', FILE); \
putc ('\n', FILE); \
} \ } \
} while (0) } while (0)
/* A table of bytes codes used by the ASM_OUTPUT_ASCII and /* A table of bytes codes used by the ASM_OUTPUT_ASCII and
ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table
......
...@@ -9885,7 +9885,7 @@ dwarf2out_line (filename, line) ...@@ -9885,7 +9885,7 @@ dwarf2out_line (filename, line)
if (DWARF2_ASM_LINE_DEBUG_INFO) if (DWARF2_ASM_LINE_DEBUG_INFO)
{ {
static char *lastfile; static const char *lastfile;
/* Emit the .file and .loc directives understood by GNU as. */ /* Emit the .file and .loc directives understood by GNU as. */
if (lastfile == 0 || strcmp (filename, lastfile)) if (lastfile == 0 || strcmp (filename, lastfile))
......
...@@ -1907,7 +1907,7 @@ expand_rethrow (label) ...@@ -1907,7 +1907,7 @@ expand_rethrow (label)
else else
if (flag_new_exceptions) if (flag_new_exceptions)
{ {
rtx insn, val; rtx insn;
int region; int region;
if (label == NULL_RTX) if (label == NULL_RTX)
label = last_rethrow_symbol; label = last_rethrow_symbol;
......
...@@ -9012,7 +9012,6 @@ do_jump_by_parts_greater_rtx (mode, unsignedp, op0, op1, if_false_label, if_true ...@@ -9012,7 +9012,6 @@ do_jump_by_parts_greater_rtx (mode, unsignedp, op0, op1, if_false_label, if_true
/* Compare a word at a time, high order first. */ /* Compare a word at a time, high order first. */
for (i = 0; i < nwords; i++) for (i = 0; i < nwords; i++)
{ {
rtx comp;
rtx op0_word, op1_word; rtx op0_word, op1_word;
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
......
...@@ -6080,9 +6080,8 @@ replace_insns (first, last, first_new, notes) ...@@ -6080,9 +6080,8 @@ replace_insns (first, last, first_new, notes)
rtx first, last, first_new, notes; rtx first, last, first_new, notes;
{ {
rtx stop = NEXT_INSN (last); rtx stop = NEXT_INSN (last);
rtx last_new;
rtx curr, next;
rtx prev = PREV_INSN (first); rtx prev = PREV_INSN (first);
rtx last_new, curr;
int i; int i;
if (notes == NULL_RTX) if (notes == NULL_RTX)
...@@ -6356,8 +6355,7 @@ create_edge_list () ...@@ -6356,8 +6355,7 @@ create_edge_list ()
struct edge_list *elist; struct edge_list *elist;
edge e; edge e;
int num_edges; int num_edges;
int x,y; int x;
int_list_ptr ptr;
int block_count; int block_count;
block_count = n_basic_blocks + 2; /* Include the entry and exit blocks. */ block_count = n_basic_blocks + 2; /* Include the entry and exit blocks. */
...@@ -6451,8 +6449,6 @@ verify_edge_list (f, elist) ...@@ -6451,8 +6449,6 @@ verify_edge_list (f, elist)
struct edge_list *elist; struct edge_list *elist;
{ {
int x, pred, succ, index; int x, pred, succ, index;
int_list_ptr ptr;
int flawed = 0;
edge e; edge e;
for (x = 0; x < n_basic_blocks; x++) for (x = 0; x < n_basic_blocks; x++)
......
...@@ -577,7 +577,9 @@ static void find_used_regs PROTO ((rtx)); ...@@ -577,7 +577,9 @@ static void find_used_regs PROTO ((rtx));
static int try_replace_reg PROTO ((rtx, rtx, rtx)); static int try_replace_reg PROTO ((rtx, rtx, rtx));
static struct expr *find_avail_set PROTO ((int, rtx)); static struct expr *find_avail_set PROTO ((int, rtx));
static int cprop_jump PROTO((rtx, rtx, struct reg_use *, rtx)); static int cprop_jump PROTO((rtx, rtx, struct reg_use *, rtx));
#ifdef HAVE_cc0
static int cprop_cc0_jump PROTO((rtx, struct reg_use *, rtx)); static int cprop_cc0_jump PROTO((rtx, struct reg_use *, rtx));
#endif
static int cprop_insn PROTO ((rtx, int)); static int cprop_insn PROTO ((rtx, int));
static int cprop PROTO ((int)); static int cprop PROTO ((int));
static int one_cprop_pass PROTO ((int, int)); static int one_cprop_pass PROTO ((int, int));
......
...@@ -459,9 +459,6 @@ gen_expand (expand) ...@@ -459,9 +459,6 @@ gen_expand (expand)
printf (" rtx operand%d;\n", i); printf (" rtx operand%d;\n", i);
for (; i <= max_scratch_opno; i++) for (; i <= max_scratch_opno; i++)
printf (" rtx operand%d;\n", i); printf (" rtx operand%d;\n", i);
if (operands > 0 || max_dup_opno >= 0 || max_scratch_opno >= 0)
printf (" rtx operands[%d];\n",
MAX (operands, MAX (max_scratch_opno, max_dup_opno) + 1));
printf (" rtx _val = 0;\n"); printf (" rtx _val = 0;\n");
printf (" start_sequence ();\n"); printf (" start_sequence ();\n");
...@@ -473,6 +470,10 @@ gen_expand (expand) ...@@ -473,6 +470,10 @@ gen_expand (expand)
So copy the operand values there before executing it. */ So copy the operand values there before executing it. */
if (XSTR (expand, 3) && *XSTR (expand, 3)) if (XSTR (expand, 3) && *XSTR (expand, 3))
{ {
printf (" {\n");
if (operands > 0 || max_dup_opno >= 0 || max_scratch_opno >= 0)
printf (" rtx operands[%d];\n",
MAX (operands, MAX (max_scratch_opno, max_dup_opno) + 1));
/* Output code to copy the arguments into `operands'. */ /* Output code to copy the arguments into `operands'. */
for (i = 0; i < operands; i++) for (i = 0; i < operands; i++)
printf (" operands[%d] = operand%d;\n", i, i); printf (" operands[%d] = operand%d;\n", i, i);
...@@ -492,6 +493,7 @@ gen_expand (expand) ...@@ -492,6 +493,7 @@ gen_expand (expand)
for (; i <= max_scratch_opno; i++) for (; i <= max_scratch_opno; i++)
printf (" operand%d = operands[%d];\n", i, i); printf (" operand%d = operands[%d];\n", i, i);
} }
printf (" }\n");
} }
/* Output code to construct the rtl for the instruction bodies. /* Output code to construct the rtl for the instruction bodies.
...@@ -815,7 +817,6 @@ from the machine description file `md'. */\n\n"); ...@@ -815,7 +817,6 @@ from the machine description file `md'. */\n\n");
printf ("#include \"resource.h\"\n"); printf ("#include \"resource.h\"\n");
printf ("#include \"reload.h\"\n\n"); printf ("#include \"reload.h\"\n\n");
printf ("extern rtx recog_operand[];\n"); printf ("extern rtx recog_operand[];\n");
printf ("#define operands emit_operand\n\n");
printf ("#define FAIL return (end_sequence (), _val)\n"); printf ("#define FAIL return (end_sequence (), _val)\n");
printf ("#define DONE return (_val = gen_sequence (), end_sequence (), _val)\n"); printf ("#define DONE return (_val = gen_sequence (), end_sequence (), _val)\n");
......
...@@ -1979,9 +1979,12 @@ from the machine description file `md'. */\n\n"); ...@@ -1979,9 +1979,12 @@ from the machine description file `md'. */\n\n");
break_out_subroutines (split_tree, SPLIT, 1); break_out_subroutines (split_tree, SPLIT, 1);
write_subroutine (split_tree.first, SPLIT); write_subroutine (split_tree.first, SPLIT);
if (peephole2_tree.first)
{
next_subroutine_number = 0; next_subroutine_number = 0;
break_out_subroutines (peephole2_tree, PEEPHOLE2, 1); break_out_subroutines (peephole2_tree, PEEPHOLE2, 1);
write_subroutine (peephole2_tree.first, PEEPHOLE2); write_subroutine (peephole2_tree.first, PEEPHOLE2);
}
fflush (stdout); fflush (stdout);
exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE); exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
......
...@@ -476,7 +476,7 @@ extern const char * const reg_note_name[]; ...@@ -476,7 +476,7 @@ extern const char * const reg_note_name[];
#define NOTE_EH_HANDLER(INSN) X0INT(INSN, 3) #define NOTE_EH_HANDLER(INSN) X0INT(INSN, 3)
#define NOTE_RANGE_INFO(INSN) X0EXP(INSN, 3) #define NOTE_RANGE_INFO(INSN) X0EXP(INSN, 3)
#define NOTE_LIVE_INFO(INSN) X0EXP(INSN, 3) #define NOTE_LIVE_INFO(INSN) X0EXP(INSN, 3)
#define NOTE_BASIC_BLOCK(INSN) X0EXP(INSN, 3) #define NOTE_BASIC_BLOCK(INSN) X0BBDEF(INSN, 3)
/* If the NOTE_BLOCK_NUMBER field gets a -1, it means create a new /* If the NOTE_BLOCK_NUMBER field gets a -1, it means create a new
block node for a live range block. */ block node for a live range block. */
......
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