summaryrefslogtreecommitdiff
path: root/gcc/genattrtab.c
diff options
context:
space:
mode:
authormatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-06 21:11:54 +0000
committermatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-06 21:11:54 +0000
commit5df34b555877d95cbee3b6ee74ca4e5bf08cbdd3 (patch)
treebfcb660e22637e48c3765280e8934374795777b6 /gcc/genattrtab.c
parented33a25553aea32ff5a43b154e74f77091b1e751 (diff)
downloadgcc-5df34b555877d95cbee3b6ee74ca4e5bf08cbdd3.tar.gz
* genattrtab.c (write_attr_get, write_attr_case): Use insn_code
member only if only one insn is associated with the value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102816 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genattrtab.c')
-rw-r--r--gcc/genattrtab.c15
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))
{