Commit 2bfa88dc by Richard Earnshaw Committed by Richard Earnshaw

arm.c (note_invalid_constants): No need to ignore ASMs, we can now rework these too.

* arm.c (note_invalid_constants): No need to ignore ASMs, we can
now rework these too.
(arm_reorg): If an insn can't reach the end of the current pool,
ensure that we emit that pool before the insn.

From-SVN: r29084
parent 9c5b50b3
No preview for this file type
...@@ -4236,10 +4236,6 @@ note_invalid_constants (insn, address) ...@@ -4236,10 +4236,6 @@ note_invalid_constants (insn, address)
/* Extract the operands of the insn */ /* Extract the operands of the insn */
extract_insn(insn); extract_insn(insn);
/* If this is an asm, we can't do anything about it (or can we?) */
if (INSN_CODE (insn) < 0)
return;
/* Find the alternative selected */ /* Find the alternative selected */
if (! constrain_operands (1)) if (! constrain_operands (1))
fatal_insn_not_found (insn); fatal_insn_not_found (insn);
...@@ -4375,11 +4371,20 @@ arm_reorg (first) ...@@ -4375,11 +4371,20 @@ arm_reorg (first)
barrier = last_barrier->insn; barrier = last_barrier->insn;
ftmp = last_barrier; ftmp = last_barrier;
} }
/* ftmp is last fix that we can fit into this pool and we
failed to find a barrier that we could use. Insert a new
barrier in the code and arrange to jump around it. */
else else
/* ftmp is last fix that we can fit into this pool and we {
failed to find a barrier that we could use. Insert a new /* Check that there isn't another fix that is in range that
barrier in the code and arrange to jump around it. */ we couldn't fit into this pool because the pool was
barrier = find_barrier (ftmp->insn, max_range - ftmp->address); already too large: we need to put the pool before such an
instruction. */
if (ftmp->next && ftmp->next->address < max_range)
max_range = ftmp->address;
barrier = find_barrier (ftmp->insn, max_range - ftmp->address);
}
/* Scan over the fixes we have identified for this pool, fixing them /* Scan over the fixes we have identified for this pool, fixing them
up and adding the constants to the pool itself. */ up and adding the constants to the pool itself. */
......
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