diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-08-21 07:49:28 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-08-21 07:49:28 +0000 |
commit | 95770ca3202ebd8529d202aaf4714343a2c4e14e (patch) | |
tree | 3a51c7e76552c742934054882bbc0166fa7aacf9 /gcc/genemit.c | |
parent | 07db0f9bb354bd9a46e62c6d9960a9a3c40d1c15 (diff) | |
download | gcc-95770ca3202ebd8529d202aaf4714343a2c4e14e.zip gcc-95770ca3202ebd8529d202aaf4714343a2c4e14e.tar.gz gcc-95770ca3202ebd8529d202aaf4714343a2c4e14e.tar.bz2 |
Use rtx_insn internally within generated functions
2014-08-21 David Malcolm <dmalcolm@redhat.com>
* recog.h (insn_output_fn): Update this function typedef to match
the changes below to the generated output functions, strengthening
the 2nd param from rtx to rtx_insn *.
* final.c (get_insn_template): Add a checked cast to rtx_insn * on
insn when invoking an output function, to match the new signature
of insn_output_fn with a stronger second param.
* genconditions.c (write_header): In the generated code for
gencondmd.c, strengthen the global "insn" from rtx to rtx_insn *
to match the other changes in this patch.
* genemit.c (gen_split): Strengthen the 1st param "curr_insn" of
the generated "gen_" functions from rtx to rtx_insn * within their
implementations.
* genrecog.c (write_subroutine): Strengthen the 2nd param "insn" of
the subfunctions within the generated "recog_", "split", "peephole2"
function trees from rtx to rtx_insn *. For now, the top-level
generated functions ("recog", "split", "peephole2") continue to
take a plain rtx for "insn", to avoid introducing dependencies on
other patches. Rename this 2nd param from "insn" to
"uncast_insn", and reintroduce "insn" as a local variable of type
rtx_insn *, initialized at the top of the generated function with
a checked cast on "uncast_insn".
(make_insn_sequence): Strengthen the 1st param "curr_insn" of
the generated "gen_" functions from rtx to rtx_insn * within their
prototypes.
* genoutput.c (process_template): Strengthen the 2nd param within
the generated "output_" functions "insn" from rtx to rtx_insn *.
From-SVN: r214257
Diffstat (limited to 'gcc/genemit.c')
-rw-r--r-- | gcc/genemit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/genemit.c b/gcc/genemit.c index 16b5644..1bc73f0 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -557,15 +557,15 @@ 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, rtx *);\n", + printf ("extern rtx gen_%s_%d (rtx_insn *, rtx *);\n", name, insn_code_number); - printf ("rtx\ngen_%s_%d (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands%s)\n", + printf ("rtx\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, rtx *);\n", insn_code_number); - printf ("rtx\ngen_split_%d (rtx curr_insn ATTRIBUTE_UNUSED, rtx *operands%s)\n", + 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", insn_code_number, unused); } printf ("{\n"); |