]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
genattrtab.c (write_attr_get, [...]): Use insn_code member only if only one insn...
authorMichael Matz <matz@gcc.gnu.org>
Sat, 6 Aug 2005 21:11:54 +0000 (21:11 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Sat, 6 Aug 2005 21:11:54 +0000 (21:11 +0000)
* 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

gcc/ChangeLog
gcc/genattrtab.c

index 436e5a65cdca8d82c417b5047ebcd3dbdfbe2f78..92ef347c24aa654320538cc793672b70210b873a 100644 (file)
@@ -1,19 +1,24 @@
+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>
 
        * 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.
 
index 1f919a40e4083f9f0300f95a8a6d129709c4a3ac..78a61e86981cfb4dd1335a06bf4f8fdfd46bae4f 100644 (file)
@@ -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))
     {