Take this example code (m68k, MRI mode) xxxglob: dc.w -1 1: nop bra.b 1f ffxxx: dc.w -2 1: nop bra.b 1b it assembles into this: ff ff (-1) 4e 71 (nop) 60 02 (bra.b +2 bytes) ff fe (-2) 4e 71 (nop) 60 f5 (bra -11 bytes, wtf?! it should be bra -2 bytes here!) ab cd (0xabcd) I tested it even on old gas 2.13 and this bug is here... strange nobody noticed it. It happens only when in MRI mode.
In MRI mode, 1b is a number in base 2. MRI mode is only for compatibility with existing MRI assembler code, don't use it.