Revision 18357, in 1998, introduced a mechanism to keep track of label
alignments during shorten branches. It tries to determine the known
alignment at every point in the function, and compute the amount of padding
needed at every label.
The problem is, to do this, we need to know the exact length of every
instruction. The Blackfin has a few patterns where the length attribute
gives a maximum rather than an exact value, but even if the machine
description is 100% accurate, there is in general no way of knowing the
exact length of an asm statement.
I have a testcase where the compiler produces an assembly file that has an
out-of-range jump, because it thought the label at the start of a jump table
(which has an alignment of 4) needs no padding, when in fact it needs 2
bytes of padding.
Can anyone think of a way to make this code work, or should I just post a
patch to mostly revert 18357?