http://sourceware.org/bugzilla/show_bug.cgi?id=15721
Bug ID: 15721
Summary: [PATCH] elf32-msp430 10-bit PCREL offsets masked for
12 bits
Product: binutils
Version: 2.24 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: quandary at remstate dot com
Target: msp430
Created attachment 7107
--> http://sourceware.org/bugzilla/attachment.cgi?id=7107&action=edit
Fix MSP430 HOWTO table to mask 10 bits on 10-bit address jumps
bfd/elf32-msp430.c declares a handful of jumps in its HOWTO which are 2-byte
opcodes with an embedded 10-bit address (*_10_PCREL, *_2x_PCREL). If you
assemble a simple program, such as:
start:
jmp late
early:
jmp end
late:
jmp early
end:
the final jump will be a negative offset. Because the HOWTO masks for these
jumps are 0xfff, the low bits of the opcode get junked -- in this case,
converting the final JMP into a JL opcode.
The fix is to use the correct mask (0x03ff).
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils