Commit e7041fcc by David Malcolm Committed by David Malcolm

config/h8300: Use rtx_insn

gcc/
	* config/h8300/h8300-protos.h (final_prescan_insn): Strengthen
	first param from rtx to rtx_insn *.
	(h8300_insn_length_from_table): Likewise.
	* config/h8300/h8300.c (F): Likewise for return type and param
	"x".
	(Fpa): Add a checked cast to rtx_insn *.
	(h8300_emit_stack_adjustment): Strengthen local "x" from rtx to
	rtx_insn *.
	(final_prescan_insn): Likewise for param "insn".
	(h8300_binary_length): Likewise.
	(h8300_insn_length_from_table): Likewise.

From-SVN: r214442
parent bcfba653
2014-08-25 David Malcolm <dmalcolm@redhat.com> 2014-08-25 David Malcolm <dmalcolm@redhat.com>
* config/h8300/h8300-protos.h (final_prescan_insn): Strengthen
first param from rtx to rtx_insn *.
(h8300_insn_length_from_table): Likewise.
* config/h8300/h8300.c (F): Likewise for return type and param
"x".
(Fpa): Add a checked cast to rtx_insn *.
(h8300_emit_stack_adjustment): Strengthen local "x" from rtx to
rtx_insn *.
(final_prescan_insn): Likewise for param "insn".
(h8300_binary_length): Likewise.
(h8300_insn_length_from_table): Likewise.
2014-08-25 David Malcolm <dmalcolm@redhat.com>
* config/epiphany/epiphany-protos.h (epiphany_final_prescan_insn): * config/epiphany/epiphany-protos.h (epiphany_final_prescan_insn):
Strengthen first param "insn" from rtx to rtx_insn *. Strengthen first param "insn" from rtx to rtx_insn *.
......
...@@ -33,7 +33,7 @@ extern unsigned int compute_a_shift_length (rtx, rtx *); ...@@ -33,7 +33,7 @@ extern unsigned int compute_a_shift_length (rtx, rtx *);
extern const char *output_a_rotate (enum rtx_code, rtx *); extern const char *output_a_rotate (enum rtx_code, rtx *);
extern unsigned int compute_a_rotate_length (rtx *); extern unsigned int compute_a_rotate_length (rtx *);
extern const char *output_simode_bld (int, rtx[]); extern const char *output_simode_bld (int, rtx[]);
extern void final_prescan_insn (rtx, rtx *, int); extern void final_prescan_insn (rtx_insn *, rtx *, int);
extern int h8300_expand_movsi (rtx[]); extern int h8300_expand_movsi (rtx[]);
extern void notice_update_cc (rtx, rtx); extern void notice_update_cc (rtx, rtx);
extern const char *output_logical_op (enum machine_mode, rtx *); extern const char *output_logical_op (enum machine_mode, rtx *);
...@@ -107,7 +107,7 @@ struct cpp_reader; ...@@ -107,7 +107,7 @@ struct cpp_reader;
extern void h8300_pr_interrupt (struct cpp_reader *); extern void h8300_pr_interrupt (struct cpp_reader *);
extern void h8300_pr_saveall (struct cpp_reader *); extern void h8300_pr_saveall (struct cpp_reader *);
extern enum reg_class h8300_reg_class_from_letter (int); extern enum reg_class h8300_reg_class_from_letter (int);
extern unsigned int h8300_insn_length_from_table (rtx, rtx *); extern unsigned int h8300_insn_length_from_table (rtx_insn *, rtx *);
extern const char * output_h8sx_shift (rtx *, int, int); extern const char * output_h8sx_shift (rtx *, int, int);
extern bool h8300_operands_match_p (rtx *); extern bool h8300_operands_match_p (rtx *);
extern bool h8sx_mergeable_memrefs_p (rtx, rtx); extern bool h8sx_mergeable_memrefs_p (rtx, rtx);
......
...@@ -115,7 +115,7 @@ static unsigned int h8300_length_from_table (rtx, rtx, const h8300_length_ ...@@ -115,7 +115,7 @@ static unsigned int h8300_length_from_table (rtx, rtx, const h8300_length_
static unsigned int h8300_unary_length (rtx); static unsigned int h8300_unary_length (rtx);
static unsigned int h8300_short_immediate_length (rtx); static unsigned int h8300_short_immediate_length (rtx);
static unsigned int h8300_bitfield_length (rtx, rtx); static unsigned int h8300_bitfield_length (rtx, rtx);
static unsigned int h8300_binary_length (rtx, const h8300_length_table *); static unsigned int h8300_binary_length (rtx_insn *, const h8300_length_table *);
static bool h8300_short_move_mem_p (rtx, enum rtx_code); static bool h8300_short_move_mem_p (rtx, enum rtx_code);
static unsigned int h8300_move_length (rtx *, const h8300_length_table *); static unsigned int h8300_move_length (rtx *, const h8300_length_table *);
static bool h8300_hard_regno_scratch_ok (unsigned int); static bool h8300_hard_regno_scratch_ok (unsigned int);
...@@ -486,8 +486,8 @@ byte_reg (rtx x, int b) ...@@ -486,8 +486,8 @@ byte_reg (rtx x, int b)
&& !crtl->is_leaf))) && !crtl->is_leaf)))
/* We use this to wrap all emitted insns in the prologue. */ /* We use this to wrap all emitted insns in the prologue. */
static rtx static rtx_insn *
F (rtx x, bool set_it) F (rtx_insn *x, bool set_it)
{ {
if (set_it) if (set_it)
RTX_FRAME_RELATED_P (x) = 1; RTX_FRAME_RELATED_P (x) = 1;
...@@ -507,7 +507,7 @@ Fpa (rtx par) ...@@ -507,7 +507,7 @@ Fpa (rtx par)
int i; int i;
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
F (XVECEXP (par, 0, i), true); F (as_a <rtx_insn *> (XVECEXP (par, 0, i)), true);
return par; return par;
} }
...@@ -544,8 +544,9 @@ h8300_emit_stack_adjustment (int sign, HOST_WIDE_INT size, bool in_prologue) ...@@ -544,8 +544,9 @@ h8300_emit_stack_adjustment (int sign, HOST_WIDE_INT size, bool in_prologue)
the splitter will do. */ the splitter will do. */
if (Pmode == HImode) if (Pmode == HImode)
{ {
rtx x = emit_insn (gen_addhi3 (stack_pointer_rtx, rtx_insn *x = emit_insn (gen_addhi3 (stack_pointer_rtx,
stack_pointer_rtx, GEN_INT (sign * size))); stack_pointer_rtx,
GEN_INT (sign * size)));
if (size < 4) if (size < 4)
F (x, in_prologue); F (x, in_prologue);
} }
...@@ -1875,7 +1876,7 @@ h8300_print_operand_address (FILE *file, rtx addr) ...@@ -1875,7 +1876,7 @@ h8300_print_operand_address (FILE *file, rtx addr)
option. */ option. */
void void
final_prescan_insn (rtx insn, rtx *operand ATTRIBUTE_UNUSED, final_prescan_insn (rtx_insn *insn, rtx *operand ATTRIBUTE_UNUSED,
int num_operands ATTRIBUTE_UNUSED) int num_operands ATTRIBUTE_UNUSED)
{ {
/* This holds the last insn address. */ /* This holds the last insn address. */
...@@ -2439,7 +2440,7 @@ h8300_bitfield_length (rtx op, rtx op2) ...@@ -2439,7 +2440,7 @@ h8300_bitfield_length (rtx op, rtx op2)
/* Calculate the length of general binary instruction INSN using TABLE. */ /* Calculate the length of general binary instruction INSN using TABLE. */
static unsigned int static unsigned int
h8300_binary_length (rtx insn, const h8300_length_table *table) h8300_binary_length (rtx_insn *insn, const h8300_length_table *table)
{ {
rtx set; rtx set;
...@@ -2528,7 +2529,7 @@ h8300_mova_length (rtx dest, rtx src, rtx offset) ...@@ -2528,7 +2529,7 @@ h8300_mova_length (rtx dest, rtx src, rtx offset)
OPERANDS is the array of its operands. */ OPERANDS is the array of its operands. */
unsigned int unsigned int
h8300_insn_length_from_table (rtx insn, rtx * operands) h8300_insn_length_from_table (rtx_insn *insn, rtx * operands)
{ {
switch (get_attr_length_table (insn)) switch (get_attr_length_table (insn))
{ {
......
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