Write a note on register allocation

You can use 14 of the 16 visible ARM registers to hold general-purpose data.the other two registers are the stack pointer,R13,and the program counter,r15.for a function to be ATPCS complaint it must preserve the caller values of registers r4 to r11.

ATPCS also specifies that the stack should be eight-byte alligned.therefore you must preserve this allignment if calling subroutines use the following template for optimized assembly routine requiring many registers.

Posted on by