Hi, I am trying to understand how the general purpose registers are used by the GCC compiler. Most I have been able to work out but have these questions. Register R12 is initialised in my startup code to the same value as the SP (R13) but it never appears to be used for anything. Whats the purpose of this register? I have looked at the ARM and THUMB procedure call standard (briefly) and it looks as though R7 is the Thumb-state Work register or variable register. However, looking at the assembly code produced for functions it is clearly being used as the frame pointer. Why is there a difference? Is there a defining text somewhere that details GCC register usage when compiling for a Cortex-M3 chip? I am using GCC V4.1.1 and a STM32F103RB (Cortex-M3) microcontroller. Regards -- View this message in context: http://www.nabble.com/Register-Usage-tp23279910p23279910.html Sent from the gcc - Help mailing list archive at Nabble.com.