-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
Description
At present, the ARM toolchain will emit the following code for an indirect branch ADD lr, pc, #0 ADD pc, r0, #0 This can be achieved with the following single instruction BLX r0 The BLX instruction is available on ARMv4T and all newer processors. In addition to saving word in the instruction stream, the ARM documentation indicates that BLX is recognized as procedure calls by the program flow prediction hardware while moves to the PC are not. Newer reference http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0438g/BABGEAEF.html Older reference http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0360f/Cihdbcef.html