aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Stott <grahams@redhat.com>2001-08-08 08:22:05 +0000
committerGraham Stott <grahams@gcc.gnu.org>2001-08-08 08:22:05 +0000
commit674fc07da0975c21f24b71915d5cc6f3015e8feb (patch)
tree805e1c04d69bd1029f6a43d0fcdb3788f2cb79d1
parent5f9689e59f9d5af9df5383c677e28aa1e9164ccd (diff)
downloadgcc-674fc07da0975c21f24b71915d5cc6f3015e8feb.zip
gcc-674fc07da0975c21f24b71915d5cc6f3015e8feb.tar.gz
gcc-674fc07da0975c21f24b71915d5cc6f3015e8feb.tar.bz2
final.c (shorten_branches): Update the INSN_ADDRESSES of insns within fixed length SEQUENCE.
* final.c (shorten_branches): Update the INSN_ADDRESSES of insns within fixed length SEQUENCE. From-SVN: r44712
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/final.c21
2 files changed, 25 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 878d64b..dafb983 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/final.c b/gcc/final.c
index d3215ad..ce5f1d9 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -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;