diff options
author | Kaz Kojima <kkojima@gcc.gnu.org> | 2006-11-13 03:28:13 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@gcc.gnu.org> | 2006-11-13 03:28:13 +0000 |
commit | 329b3cc384733e2f4df34f31b32600787398c798 (patch) | |
tree | 59971702035ebe1fb851b935b3c42eccd90dded2 /gcc/genemit.c | |
parent | 6d55dfe3a3317e05401df3a941e4ef2cdf7a86ed (diff) | |
download | gcc-329b3cc384733e2f4df34f31b32600787398c798.zip gcc-329b3cc384733e2f4df34f31b32600787398c798.tar.gz gcc-329b3cc384733e2f4df34f31b32600787398c798.tar.bz2 |
genemit.c (gen_insn): Call gen_exp with a non-null used when handling multiple insns.
* genemit.c (gen_insn): Call gen_exp with a non-null used
when handling multiple insns.
(gen_expand): Likewise.
* reorg.c (emit_delay_sequence): Copy the delay slot insn.
* config/sh/sh.md (ashrsi2_31+1): Copy operands[0].
(movsi_const_16bit+1): Copy operands[1].
(call_pcrel): Copy the call_site pattern.
(call_value_pcrel, sibcall_pcrel, GOTaddr2picreg): Likewise.
From-SVN: r118746
Diffstat (limited to 'gcc/genemit.c')
-rw-r--r-- | gcc/genemit.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/genemit.c b/gcc/genemit.c index 79db84e..a1ebcf6 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -428,15 +428,18 @@ gen_insn (rtx insn, int lineno) } else { + char *used = XCNEWVEC (char, operands); + 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, NULL); + gen_exp (XVECEXP (insn, 1, i), DEFINE_INSN, used); } printf ("));\n}\n\n"); + XDELETEVEC (used); } } @@ -447,6 +450,7 @@ gen_expand (rtx expand) { int operands; int i; + char *used; if (strlen (XSTR (expand, 0)) == 0) fatal ("define_expand lacks a name"); @@ -530,6 +534,8 @@ gen_expand (rtx expand) Use emit_insn to add them to the sequence being accumulated. But don't do this if the user's code has set `no_more' nonzero. */ + used = XCNEWVEC (char, operands); + for (i = 0; i < XVECLEN (expand, 1); i++) { rtx next = XVECEXP (expand, 1, i); @@ -560,13 +566,15 @@ gen_expand (rtx expand) printf (" emit ("); else printf (" emit_insn ("); - gen_exp (next, DEFINE_EXPAND, NULL); + gen_exp (next, DEFINE_EXPAND, used); printf (");\n"); if (GET_CODE (next) == SET && GET_CODE (SET_DEST (next)) == PC && GET_CODE (SET_SRC (next)) == LABEL_REF) printf (" emit_barrier ();"); } + XDELETEVEC (used); + /* Call `get_insns' to extract the list of all the insns emitted within this gen_... function. */ |