From: Graham Stott Date: Wed, 8 Aug 2001 08:22:05 +0000 (+0000) Subject: final.c (shorten_branches): Update the INSN_ADDRESSES of insns within fixed length... X-Git-Tag: prereleases/libstdc++-3.0.95~2803 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=674fc07da0975c21f24b71915d5cc6f3015e8feb;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 878d64b51255..dafb983ebb2e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-08-08 Graham Stott + + * final.c (shorten_branches): Update the INSN_ADDRESSES of insns + within fixed length SEQUENCE. + 2001-08-08 Graham Stott * diagnostic.h (diagnostic_format_decoder): Parenthesize macro parameter. diff --git a/gcc/final.c b/gcc/final.c index d3215adcfafa..ce5f1d919aee 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;