diff options
author | Michael Matz <matz@gcc.gnu.org> | 2005-08-06 21:11:54 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2005-08-06 21:11:54 +0000 |
commit | 3e0a6ca6aea49b54733303a7be6bb64b261937ea (patch) | |
tree | bfcb660e22637e48c3765280e8934374795777b6 /gcc/genattrtab.c | |
parent | 9da375252f4120e75292b93f4d03b9a7aa95f084 (diff) | |
download | gcc-3e0a6ca6aea49b54733303a7be6bb64b261937ea.tar.gz |
genattrtab.c (write_attr_get, [...]): Use insn_code member only if only one insn is associated with the value.
* genattrtab.c (write_attr_get, write_attr_case): Use insn_code
member only if only one insn is associated with the value.
From-SVN: r102816
Diffstat (limited to 'gcc/genattrtab.c')
-rw-r--r-- | gcc/genattrtab.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 1f919a40e40..78a61e86981 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -3677,10 +3677,13 @@ write_attr_get (struct attr_desc *attr) printf ("{\n"); for (av = attr->first_value; av; av = av->next) - if (av->num_insns != 0) + if (av->num_insns == 1) write_attr_set (attr, 2, av->value, "return", ";", true_rtx, av->first_insn->def->insn_code, av->first_insn->def->insn_index); + else if (av->num_insns != 0) + write_attr_set (attr, 2, av->value, "return", ";", + true_rtx, -2, 0); printf ("}\n\n"); return; @@ -3882,9 +3885,13 @@ write_attr_case (struct attr_desc *attr, struct attr_value *av, printf ("extract_insn_cached (insn);\n"); } - write_attr_set (attr, indent + 2, av->value, prefix, suffix, - known_true, av->first_insn->def->insn_code, - av->first_insn->def->insn_index); + if (av->num_insns == 1) + write_attr_set (attr, indent + 2, av->value, prefix, suffix, + known_true, av->first_insn->def->insn_code, + av->first_insn->def->insn_index); + else + write_attr_set (attr, indent + 2, av->value, prefix, suffix, + known_true, -2, 0); if (strncmp (prefix, "return", 6)) { |