summaryrefslogtreecommitdiff
path: root/gcc/genemit.c
diff options
context:
space:
mode:
authormiyuki <miyuki@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-06 05:39:16 +0000
committermiyuki <miyuki@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-06 05:39:16 +0000
commit58a87a29ba8b650e6dc901fbe4a37fe905a046be (patch)
tree59990e06cf8ced52d365080821323351c4790c1c /gcc/genemit.c
parent9f96175798df76cbd74e3081e5384857315fc921 (diff)
downloadgcc-58a87a29ba8b650e6dc901fbe4a37fe905a046be.tar.gz
Promote types of rtl expressions to rtx_insn in gen_split and gen_peephole2
* combine.c (combine_split_insns): Remove cast. * config/bfin/bfin.c (hwloop_fail): Add cast in try_split call. * config/sh/sh.c (sh_try_split_insn_simple): Remove cast. * config/sh/sh_treg_combine.cc (sh_treg_combine::execute): Add cast. * emit-rtl.c (try_split): Promote type of trial argument to rtx_insn. * genemit.c (gen_split): Change return type of generated functions to rtx_insn. * genrecog.c (get_failure_return): Use NULL instead of NULL_RTX. (print_subroutine_start): Promote rtx to rtx_insn in gen_split_* and gen_peephole2_* functions. (print_subroutine, main): Likewise. * recog.c (peephole2_optimize): Remove cast. (peep2_next_insn): Promote return type to rtx_insn. * recog.h (peep2_next_insn): Fix prototype. * rtl.h (try_split, split_insns): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224183 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genemit.c')
-rw-r--r--gcc/genemit.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/genemit.c b/gcc/genemit.c
index 3f5dd825a1e..e5b39fdd47e 100644
--- a/gcc/genemit.c
+++ b/gcc/genemit.c
@@ -568,15 +568,17 @@ gen_split (rtx split)
/* Output the prototype, function name and argument declarations. */
if (GET_CODE (split) == DEFINE_PEEPHOLE2)
{
- printf ("extern rtx gen_%s_%d (rtx_insn *, rtx *);\n",
+ printf ("extern rtx_insn *gen_%s_%d (rtx_insn *, rtx *);\n",
name, insn_code_number);
- printf ("rtx\ngen_%s_%d (rtx_insn *curr_insn ATTRIBUTE_UNUSED, rtx *operands%s)\n",
+ printf ("rtx_insn *\ngen_%s_%d (rtx_insn *curr_insn ATTRIBUTE_UNUSED, rtx *operands%s)\n",
name, insn_code_number, unused);
}
else
{
- printf ("extern rtx gen_split_%d (rtx_insn *, rtx *);\n", insn_code_number);
- printf ("rtx\ngen_split_%d (rtx_insn *curr_insn ATTRIBUTE_UNUSED, rtx *operands%s)\n",
+ printf ("extern rtx_insn *gen_split_%d (rtx_insn *, rtx *);\n",
+ insn_code_number);
+ printf ("rtx_insn *\ngen_split_%d "
+ "(rtx_insn *curr_insn ATTRIBUTE_UNUSED, rtx *operands%s)\n",
insn_code_number, unused);
}
printf ("{\n");
@@ -584,7 +586,7 @@ gen_split (rtx split)
/* Declare all local variables. */
for (i = 0; i < stats.num_operand_vars; i++)
printf (" rtx operand%d;\n", i);
- printf (" rtx _val = 0;\n");
+ printf (" rtx_insn *_val = NULL;\n");
if (GET_CODE (split) == DEFINE_PEEPHOLE2)
output_peephole2_scratches (split);