From 53970bda89023376b5764084811bc8d8b9074316 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Tue, 1 Jul 2014 06:22:08 -0400
Subject: [PATCH 142/205] config/m68k: Use rtx_insn

gcc/
	* config/m68k/m68k-protos.h (output_btst): Strengthen param 4 from
	rtx to rtx_insn *.
	(strict_low_part_peephole_ok): Likewise for param 2 "first_insn".

	* config/m68k/m68k.c (m68k_emit_movem): Likewise for return type.
	(m68k_set_frame_related): Likewise for param "insn".
	(output_btst): Likewise for param "insn".
	(m68k_move_to_reg): Likewise for local "insn".
	(m68k_call_tls_get_addr): Likewise for local "insns".
	(m68k_call_m68k_read_tp): Likewise.
	(strict_low_part_peephole_ok): Likewise for param "first_insn".
	(m68k_output_mi_thunk): Likewise for local "insn".
---
 gcc/config/m68k/m68k-protos.h |  5 +++--
 gcc/config/m68k/m68k.c        | 19 ++++++++++---------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/gcc/config/m68k/m68k-protos.h b/gcc/config/m68k/m68k-protos.h
index 512821f..f303049 100644
--- a/gcc/config/m68k/m68k-protos.h
+++ b/gcc/config/m68k/m68k-protos.h
@@ -34,7 +34,7 @@ extern const char *output_move_strictqi (rtx *);
 extern const char *output_move_double (rtx *);
 extern const char *output_move_const_single (rtx *);
 extern const char *output_move_const_double (rtx *);
-extern const char *output_btst (rtx *, rtx, rtx, rtx, int);
+extern const char *output_btst (rtx *, rtx, rtx, rtx_insn *, int);
 extern const char *output_scc_di (rtx, rtx, rtx, rtx);
 extern const char *output_addsi3 (rtx *);
 extern const char *output_andsi3 (rtx *);
@@ -44,7 +44,8 @@ extern const char *output_call (rtx);
 extern const char *output_sibcall (rtx);
 extern void output_dbcc_and_branch (rtx *);
 extern int floating_exact_log2 (rtx);
-extern bool strict_low_part_peephole_ok (enum machine_mode mode, rtx first_insn, rtx target);
+extern bool strict_low_part_peephole_ok (enum machine_mode mode,
+					 rtx_insn *first_insn, rtx target);
 
 /* Functions from m68k.c used in macros.  */
 extern int standard_68881_constant_p (rtx);
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 7f7d668..b5a5216 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -910,7 +910,7 @@ m68k_save_reg (unsigned int regno, bool interrupt_handler)
    whether or not this is pre-decrement (if STORE_P) or post-increment
    (if !STORE_P) operation.  */
 
-static rtx
+static rtx_insn *
 m68k_emit_movem (rtx base, HOST_WIDE_INT offset,
 		 unsigned int count, unsigned int regno,
 		 unsigned int mask, bool store_p, bool adjust_stack_p)
@@ -950,7 +950,7 @@ m68k_emit_movem (rtx base, HOST_WIDE_INT offset,
 /* Make INSN a frame-related instruction.  */
 
 static void
-m68k_set_frame_related (rtx insn)
+m68k_set_frame_related (rtx_insn *insn)
 {
   rtx body;
   int i;
@@ -1741,7 +1741,7 @@ output_scc_di (rtx op, rtx operand1, rtx operand2, rtx dest)
 }
 
 const char *
-output_btst (rtx *operands, rtx countop, rtx dataop, rtx insn, int signpos)
+output_btst (rtx *operands, rtx countop, rtx dataop, rtx_insn *insn, int signpos)
 {
   operands[0] = countop;
   operands[1] = dataop;
@@ -2357,7 +2357,7 @@ m68k_final_prescan_insn (rtx insn ATTRIBUTE_UNUSED,
 static rtx
 m68k_move_to_reg (rtx x, rtx orig, rtx reg)
 {
-  rtx insn;
+  rtx_insn *insn;
 
   if (reg == NULL_RTX)
     {
@@ -2494,7 +2494,7 @@ static rtx
 m68k_call_tls_get_addr (rtx x, rtx eqv, enum m68k_reloc reloc)
 {
   rtx a0;
-  rtx insns;
+  rtx_insn *insns;
   rtx dest;
 
   /* Emit the call sequence.  */
@@ -2554,7 +2554,7 @@ m68k_call_m68k_read_tp (void)
 {
   rtx a0;
   rtx eqv;
-  rtx insns;
+  rtx_insn *insns;
   rtx dest;
 
   start_sequence ();
@@ -4798,10 +4798,10 @@ print_operand_address (FILE *file, rtx addr)
    clear insn.  */
 
 bool
-strict_low_part_peephole_ok (enum machine_mode mode, rtx first_insn,
+strict_low_part_peephole_ok (enum machine_mode mode, rtx_insn *first_insn,
                              rtx target)
 {
-  rtx p = first_insn;
+  rtx_insn *p = first_insn;
 
   while ((p = PREV_INSN (p)))
     {
@@ -5041,7 +5041,8 @@ m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
 		      HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
 		      tree function)
 {
-  rtx this_slot, offset, addr, mem, insn, tmp;
+  rtx this_slot, offset, addr, mem, tmp;
+  rtx_insn *insn;
 
   /* Avoid clobbering the struct value reg by using the
      static chain reg as a temporary.  */
-- 
1.8.5.3

