diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-06-13 09:48:35 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-06-13 09:48:35 +0000 |
commit | 313d38e359bfcd8b56c946233294061c66ae21dc (patch) | |
tree | 73afaadfb9d218323d01fe93da665d1a87626ac0 /gcc/genemit.c | |
parent | a6860be9c89b7025c938f7a53c209478d3d84ca9 (diff) | |
download | gcc-313d38e359bfcd8b56c946233294061c66ae21dc.zip gcc-313d38e359bfcd8b56c946233294061c66ae21dc.tar.gz gcc-313d38e359bfcd8b56c946233294061c66ae21dc.tar.bz2 |
gensupport.h (add_implicit_parallel): Declare.
gcc/
* gensupport.h (add_implicit_parallel): Declare.
* genrecog.c (add_implicit_parallel): Move to...
* gensupport.c (add_implicit_parallel): ...here.
(process_one_cond_exec): Use it.
* genemit.c (gen_insn): Likewise.
From-SVN: r224454
Diffstat (limited to 'gcc/genemit.c')
-rw-r--r-- | gcc/genemit.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/gcc/genemit.c b/gcc/genemit.c index 29437b9..b6df49c 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -378,27 +378,15 @@ gen_insn (rtx insn, int lineno) /* Output code to construct and return the rtl for the instruction body. */ - if (XVECLEN (insn, 1) == 1) - { - printf (" return "); - gen_exp (XVECEXP (insn, 1, 0), DEFINE_INSN, NULL); - printf (";\n}\n\n"); - } - else - { - char *used = XCNEWVEC (char, stats.num_generator_args); - - printf (" return gen_rtx_PARALLEL (VOIDmode, gen_rtvec (%d", - XVECLEN (insn, 1)); - - for (i = 0; i < XVECLEN (insn, 1); i++) - { - printf (",\n\t\t"); - gen_exp (XVECEXP (insn, 1, i), DEFINE_INSN, used); - } - printf ("));\n}\n\n"); - XDELETEVEC (used); - } + rtx pattern = add_implicit_parallel (XVEC (insn, 1)); + /* ??? This is the traditional behavior, but seems suspect. */ + char *used = (XVECLEN (insn, 1) == 1 + ? NULL + : XCNEWVEC (char, stats.num_generator_args)); + printf (" return "); + gen_exp (pattern, DEFINE_INSN, used); + printf (";\n}\n\n"); + XDELETEVEC (used); } /* Generate the `gen_...' function for a DEFINE_EXPAND. */ |