Commit afc6898e by Bernd Schmidt Committed by Bernd Schmidt

Fix shorten_branches bugs

From-SVN: r36538
parent 3fbef42f
2000-09-19 Bernd Schmidt <bernds@redhat.co.uk> 2000-09-19 Bernd Schmidt <bernds@redhat.co.uk>
* final.c (insn_current_reference_address): Use INSN_SHUID of seq
rather than that of branch.
(shorten_branches): Don't increment insn_current_address twice.
Undo most of the Wed Jan 27 23:39:53 1999 patch: Undo most of the Wed Jan 27 23:39:53 1999 patch:
* loop.h (struct induction): Delete members derived, ix and last_use. * loop.h (struct induction): Delete members derived, ix and last_use.
(struct loop_ivs): Delete members first_increment_giv and (struct loop_ivs): Delete members first_increment_giv and
...@@ -22,8 +26,6 @@ ...@@ -22,8 +26,6 @@
increments. increments.
Don't set derived_regs. Don't set derived_regs.
2000-09-19 Bernd Schmidt <bernds@redhat.co.uk>
Fix misapplied earlier patch: Fix misapplied earlier patch:
* config/sh/sh.md (floatsisf_ie): Reenable. Remove explicit reference * config/sh/sh.md (floatsisf_ie): Reenable. Remove explicit reference
to fpul. to fpul.
......
...@@ -932,8 +932,9 @@ insn_current_reference_address (branch) ...@@ -932,8 +932,9 @@ insn_current_reference_address (branch)
return insn_current_address; return insn_current_address;
dest = JUMP_LABEL (branch); dest = JUMP_LABEL (branch);
/* BRANCH has no proper alignment chain set, so use SEQ. */ /* BRANCH has no proper alignment chain set, so use SEQ.
if (INSN_SHUID (branch) < INSN_SHUID (dest)) BRANCH also has no INSN_SHUID. */
if (INSN_SHUID (seq) < INSN_SHUID (dest))
{ {
/* Forward branch. */ /* Forward branch. */
return (insn_last_address + insn_lengths[seq_uid] return (insn_last_address + insn_lengths[seq_uid]
...@@ -1241,7 +1242,6 @@ shorten_branches (first) ...@@ -1241,7 +1242,6 @@ shorten_branches (first)
int align = 1 << log; int align = 1 << log;
int new_address = (insn_current_address + align - 1) & -align; int new_address = (insn_current_address + align - 1) & -align;
insn_lengths[uid] = new_address - insn_current_address; insn_lengths[uid] = new_address - insn_current_address;
insn_current_address = new_address;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment