What does bx lr do in ARM assembly language?

bx stands for branch and exchange instruction set Which means that according to the lsb (least significant bit) of the address to branch to, the processor will treat the next instruction as ARM or as thumb.

As lr usually holds the return address, it means that this is a return from a function, and if the lsb of lr is 1, it will treat the code at that address as thumb, otherwise, it will treat it as ARM.

Leave a Comment