Str r0, *(r7 + 4) = r0 // dereference ptr Sub sp, #8 sp -= 8 // allocate stack memory Finally, subroutines must preserve the contents of r4.r11 and the stack pointer r13. So if you see the ip register in a disassembly listing, it does not stand for instruction pointer. Register r12 is sometimes used as an Intra Procedure ( ip) call scratch register, meaning it holds intermediate values when a subroutine is being called. In both ARM and Thumb mode we have access to 16 32-bit registers called r0.r15. How to switch between ARM and Thumb mode will be explained shortly. The purpose of Thumb mode is to improve code density. When the CPU is in ARM mode it executes 32 bit ARM instructions, and when it is in Thumb mode it executes mixed 16- and 32-bit Thumb instructions. Simplified, an ARM processor can be in two modes: ARM mode and Thumb mode.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |