Commit 3e0a6ca6 by Michael Matz

genattrtab.c (write_attr_get, [...]): Use insn_code member only if only one insn…

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
parent 9da37525
2005-08-06 Michael Matz <matz@suse.de>
* genattrtab.c (write_attr_get, write_attr_case): Use insn_code
member only if only one insn is associated with the value.
2005-08-06 Nick Clifton <nickc@redhat.com> 2005-08-06 Nick Clifton <nickc@redhat.com>
* config/stormy16/stormy16.h (SYMBOL_FLAG_XSTORMY16_BELOW100): * config/stormy16/stormy16.h (SYMBOL_FLAG_XSTORMY16_BELOW100):
New define. New define.
(ASM_OUTPUT_LABELREF): Delete - it is no longer needed. (ASM_OUTPUT_LABELREF): Delete - it is no longer needed.
* config/stormy16/stormy16.c (xstormy16_below100_symbol): * config/stormy16/stormy16.c (xstormy16_below100_symbol):
Check symbol flags instead of symbol name mangling. Check symbol flags instead of symbol name mangling.
(xstormy16_asm_output_aligned_common): Likewise. Also (xstormy16_asm_output_aligned_common): Likewise. Also
simplify code since the bss100_section cass is the only case simplify code since the bss100_section cass is the only case
where the below100 code will be triggered. where the below100 code will be triggered.
(xstormy16_encode_section_info): Encode below100 attribute (xstormy16_encode_section_info): Encode below100 attribute
using the SYMBOL_FLAG_XSTORMY16_BELOW100 instead of mangling using the SYMBOL_FLAG_XSTORMY16_BELOW100 instead of mangling
the name. the name.
(xstormy16_strip_name_encoding): Delete - this function is no (xstormy16_strip_name_encoding): Delete - this function is no
longer needed. longer needed.
(TARGET_STRIP_NAME_ENCODING): Undefine. (TARGET_STRIP_NAME_ENCODING): Undefine.
* config/stormy16/stormy16-protos.h: Delete prototype for * config/stormy16/stormy16-protos.h: Delete prototype for
xstormy16_strip_name_encoding. xstormy16_strip_name_encoding.
......
...@@ -3677,10 +3677,13 @@ write_attr_get (struct attr_desc *attr) ...@@ -3677,10 +3677,13 @@ write_attr_get (struct attr_desc *attr)
printf ("{\n"); printf ("{\n");
for (av = attr->first_value; av; av = av->next) 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", ";", write_attr_set (attr, 2, av->value, "return", ";",
true_rtx, av->first_insn->def->insn_code, true_rtx, av->first_insn->def->insn_code,
av->first_insn->def->insn_index); 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"); printf ("}\n\n");
return; return;
...@@ -3882,9 +3885,13 @@ write_attr_case (struct attr_desc *attr, struct attr_value *av, ...@@ -3882,9 +3885,13 @@ write_attr_case (struct attr_desc *attr, struct attr_value *av,
printf ("extract_insn_cached (insn);\n"); printf ("extract_insn_cached (insn);\n");
} }
write_attr_set (attr, indent + 2, av->value, prefix, suffix, if (av->num_insns == 1)
known_true, av->first_insn->def->insn_code, write_attr_set (attr, indent + 2, av->value, prefix, suffix,
av->first_insn->def->insn_index); 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)) if (strncmp (prefix, "return", 6))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment