| |||||
Technical Support Support Resources
Product Information | ARM: FUNCTION POINTER VALUES DIFFER IN THUMB MODEInformation in this article applies to:
QUESTIONIn the following ARM Thumb test program: void (*ptr1)(void); The linker map file shows main() function located at 0x15C, but ptr1 is set to 0x15D. What's wrong? Why are the addresses different? ANSWERThere is nothing wrong. ARM mode instructions are located on 4-byte boundaries. Thumb mode instructions are located on 2-byte boundaries. In the ARM architecture, bit 0 of a function pointer indicates the mode (ARM or Thumb) of the called function, rather than a memory location. When bit 0 = 1, Thumb mode is selected. MORE INFORMATION
Last Reviewed: Friday, October 21, 2005 | ||||
| |||||