This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: b[l]x instruction in cortex-m3 code
(Without HTML this time)
On Mon, Jul 18, 2011 at 5:49 PM, Daniel Otte <daniel.otte@rub.de> wrote:
> That was also my first thought, but it happens also with calls in the same file.
No, this is something else.
> ?1d2: ? f240 13b1 ? ? ? movw ? ?r3, #433 ? ? ? ?; 0x1b1
> ?1d6: ? f2c0 0300 ? ? ? movt ? ?r3, #0
Notice the low bit set here.
> ?1e2: ? 4798 ? ? ? ? ? ?blx ? ? r3
Both bx reg and blx reg use mode based on the reg's low bit; they are
perfectly fine on Cortex-M. But if you give them an invalid argument,
they'll fault.
--
Thanks,
Daniel