diff options
author | Richard Stallman <rms@gnu.org> | 1993-05-29 00:11:59 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-05-29 00:11:59 +0000 |
commit | e8b1e86872cd6e19c4c2976646f067c868b74db4 (patch) | |
tree | 0bd5ff76771296927d88df87773d14cf2537c1fb | |
parent | 3f9bafd70e18a52488109e667b91039d8a84f68d (diff) | |
download | gcc-e8b1e86872cd6e19c4c2976646f067c868b74db4.zip gcc-e8b1e86872cd6e19c4c2976646f067c868b74db4.tar.gz gcc-e8b1e86872cd6e19c4c2976646f067c868b74db4.tar.bz2 |
(shorten_branches): Do not call insn_current_length with an insn which has a non-varying length.
(shorten_branches): Do not call insn_current_length
with an insn which has a non-varying length. Use insn_lengths instead.
From-SVN: r4590
-rw-r--r-- | gcc/final.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/final.c b/gcc/final.c index dafcfe5..5834010 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -608,7 +608,14 @@ shorten_branches (first) int inner_length; insn_addresses[inner_uid] = insn_current_address; - inner_length = insn_current_length (inner_insn); + + /* insn_current_length returns 0 for insns with a + non-varying length. */ + if (! varying_length[inner_uid]) + inner_length = insn_lengths[inner_uid]; + else + inner_length = insn_current_length (inner_insn); + if (inner_length != insn_lengths[inner_uid]) { insn_lengths[inner_uid] = inner_length; |