final.c (shorten_branches): Update the INSN_ADDRESSES of insns within fixed length...
authorGraham Stott <grahams@redhat.com>
Wed, 8 Aug 2001 08:22:05 +0000 (08:22 +0000)
committerGraham Stott <grahams@gcc.gnu.org>
Wed, 8 Aug 2001 08:22:05 +0000 (08:22 +0000)
* final.c (shorten_branches): Update the INSN_ADDRESSES of insns
within fixed length SEQUENCE.

From-SVN: r44712

gcc/ChangeLog
gcc/final.c

index 878d64b5125550a6af85403a1b7cec49ee4f457f..dafb983ebb2e61c68cc2b6be364c2f10e39858c7 100644 (file)
@@ -1,3 +1,8 @@
+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.
index d3215adcfafa8f7ab8ec1a187b3727b03371bb6a..ce5f1d919aeeed8195e49f49890f67f2843b27b2 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;