OSDN Git Service

* final.c (shorten_branches): Update the INSN_ADDRESSES of insns
authorgrahams <grahams@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Aug 2001 08:22:05 +0000 (08:22 +0000)
committergrahams <grahams@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Aug 2001 08:22:05 +0000 (08:22 +0000)
within fixed length SEQUENCE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44712 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/final.c

index 878d64b..dafb983 100644 (file)
@@ -1,5 +1,10 @@
 2001-08-08  Graham Stott  <grahams@redhat.com>
 
+       * final.c (shorten_branches): Update the INSN_ADDRESSES of insns
+       within fixed length SEQUENCE.
+
+2001-08-08  Graham Stott  <grahams@redhat.com>
+
        * diagnostic.h (diagnostic_format_decoder): Parenthesize macro parameter.
        (diagnostic_prefixing_rule): Likewise.
        (diagnostic_line_cutoff): Likewise.
index d3215ad..ce5f1d9 100644 (file)
@@ -1445,9 +1445,28 @@ shorten_branches (first)
 
          if (! (varying_length[uid]))
            {
-             insn_current_address += insn_lengths[uid];
+             if (GET_CODE (insn) == INSN
+                 && GET_CODE (PATTERN (insn)) == SEQUENCE)
+               {
+                 int i;
+
+                 body = PATTERN (insn);
+                 for (i = 0; i < XVECLEN (body, 0); i++)
+                   {
+                     rtx inner_insn = XVECEXP (body, 0, i);
+                     int inner_uid = INSN_UID (inner_insn);
+
+                     INSN_ADDRESSES (inner_uid) = insn_current_address;
+
+                     insn_current_address += insn_lengths[inner_uid];
+                   }
+                }
+             else
+               insn_current_address += insn_lengths[uid];
+
              continue;
            }
+
          if (GET_CODE (insn) == INSN && GET_CODE (PATTERN (insn)) == SEQUENCE)
            {
              int i;