aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/h8300
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2014-08-25 17:23:42 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2014-08-25 17:23:42 +0000
commite7041fccb24d611126314e352dcdf2e6001bc384 (patch)
treec238662a1cb0d441d0adef4fd180728be4d55161 /gcc/config/h8300
parentbcfba653d9710ae743487bda72123d4881e2a5a3 (diff)
downloadgcc-e7041fccb24d611126314e352dcdf2e6001bc384.zip
gcc-e7041fccb24d611126314e352dcdf2e6001bc384.tar.gz
gcc-e7041fccb24d611126314e352dcdf2e6001bc384.tar.bz2
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
Diffstat (limited to 'gcc/config/h8300')
-rw-r--r--gcc/config/h8300/h8300-protos.h4
-rw-r--r--gcc/config/h8300/h8300.c19
2 files changed, 12 insertions, 11 deletions
diff --git a/gcc/config/h8300/h8300-protos.h b/gcc/config/h8300/h8300-protos.h
index 1af2cc6..ae14125 100644
--- a/gcc/config/h8300/h8300-protos.h
+++ b/gcc/config/h8300/h8300-protos.h
@@ -33,7 +33,7 @@ extern unsigned int compute_a_shift_length (rtx, rtx *);
extern const char *output_a_rotate (enum rtx_code, rtx *);
extern unsigned int compute_a_rotate_length (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 void notice_update_cc (rtx, rtx);
extern const char *output_logical_op (enum machine_mode, rtx *);
@@ -107,7 +107,7 @@ struct cpp_reader;
extern void h8300_pr_interrupt (struct cpp_reader *);
extern void h8300_pr_saveall (struct cpp_reader *);
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 bool h8300_operands_match_p (rtx *);
extern bool h8sx_mergeable_memrefs_p (rtx, rtx);
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 998afd5..be6fe64 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -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_short_immediate_length (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 unsigned int h8300_move_length (rtx *, const h8300_length_table *);
static bool h8300_hard_regno_scratch_ok (unsigned int);
@@ -486,8 +486,8 @@ byte_reg (rtx x, int b)
&& !crtl->is_leaf)))
/* We use this to wrap all emitted insns in the prologue. */
-static rtx
-F (rtx x, bool set_it)
+static rtx_insn *
+F (rtx_insn *x, bool set_it)
{
if (set_it)
RTX_FRAME_RELATED_P (x) = 1;
@@ -507,7 +507,7 @@ Fpa (rtx par)
int 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;
}
@@ -544,8 +544,9 @@ h8300_emit_stack_adjustment (int sign, HOST_WIDE_INT size, bool in_prologue)
the splitter will do. */
if (Pmode == HImode)
{
- rtx x = emit_insn (gen_addhi3 (stack_pointer_rtx,
- stack_pointer_rtx, GEN_INT (sign * size)));
+ rtx_insn *x = emit_insn (gen_addhi3 (stack_pointer_rtx,
+ stack_pointer_rtx,
+ GEN_INT (sign * size)));
if (size < 4)
F (x, in_prologue);
}
@@ -1875,7 +1876,7 @@ h8300_print_operand_address (FILE *file, rtx addr)
option. */
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)
{
/* This holds the last insn address. */
@@ -2439,7 +2440,7 @@ h8300_bitfield_length (rtx op, rtx op2)
/* Calculate the length of general binary instruction INSN using TABLE. */
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;
@@ -2528,7 +2529,7 @@ h8300_mova_length (rtx dest, rtx src, rtx offset)
OPERANDS is the array of its operands. */
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))
{