From: Michael Matz Date: Sat, 6 Aug 2005 21:11:54 +0000 (+0000) Subject: genattrtab.c (write_attr_get, [...]): Use insn_code member only if only one insn... X-Git-Tag: misc/cutover-cvs2svn~1309 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e0a6ca6aea49b54733303a7be6bb64b261937ea;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 436e5a65cdca..92ef347c24aa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,19 +1,24 @@ +2005-08-06 Michael Matz + + * 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 * config/stormy16/stormy16.h (SYMBOL_FLAG_XSTORMY16_BELOW100): 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): 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 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 the name. - (xstormy16_strip_name_encoding): Delete - this function is no + (xstormy16_strip_name_encoding): Delete - this function is no longer needed. - (TARGET_STRIP_NAME_ENCODING): Undefine. + (TARGET_STRIP_NAME_ENCODING): Undefine. * config/stormy16/stormy16-protos.h: Delete prototype for xstormy16_strip_name_encoding. diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 1f919a40e408..78a61e86981c 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)) {