[PATCH 3/3][BFD][MSP430] MSP430: Enable relaxation of jump instructions to hard-coded pcrel offsets

Jozef Lawrynowicz jozef.l@mittosystems.com
Tue Jan 21 20:40:00 GMT 2020


This patch fixes execution failures which occur when the BR in a sequence
such as:
  J<cond> 1f
  BR
  1:
is relaxed to a JMP, and the pc-relative offset for the destination of the
J<cond> instruction is hard-coded to be 2 words ahead of the instruction.
The hard-coded offset will cause execution to jump 1 word ahead of where it
should actually go.

Instead we now detect the hard-coded offset is one we inserted earlier, and
invert the condition, allowing us to remove the BR entirely.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-MSP430-Enable-relaxation-of-jump-instructions-to-har.patch
Type: text/x-patch
Size: 4132 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200121/81753197/attachment.bin>


More information about the Binutils mailing list