diff options
author | Graham Stott <grahams@redhat.com> | 2001-08-08 08:22:05 +0000 |
---|---|---|
committer | Graham Stott <grahams@gcc.gnu.org> | 2001-08-08 08:22:05 +0000 |
commit | 674fc07da0975c21f24b71915d5cc6f3015e8feb (patch) | |
tree | 805e1c04d69bd1029f6a43d0fcdb3788f2cb79d1 /gcc/final.c | |
parent | 5f9689e59f9d5af9df5383c677e28aa1e9164ccd (diff) | |
download | gcc-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
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 21 |
1 files changed, 20 insertions, 1 deletions
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; |