Directives Reference
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All r ights reserved. 7-37
Example
p PROC ; Canonical frame address is sp + 0
EXPORT p
STMFD sp!,{r4-r6,lr}
; sp has moved relative to the canonical frame address,
; and registers r4, r5, r6 and lr are now on the stack
FRAME PUSH {r4-r6,lr}
; Equivalent to:
; FRAME ADDRESS sp,16 ; 16 bytes in {r4-r6,lr}
; FRAME SAVE {r4-r6,lr},-16
7.5.4 FRAME REGISTER
Use the
FRAME REGISTER
directive to maintain a record of the locations of function
arguments held in registers. You can only use it within functions with
FUNCTION
and
ENDFUNC
or
PROC
and
ENDP
directives.
Syntax
FRAME REGISTER reg1,reg2
where:
reg1
is the register that held the argume nt on entry to the function.
reg2
is the register in which the value is preserved.
Usage
Use the
FRAME REGISTER
directive when you us e a register to preserve an argument that
was held in a different register on entry to a function.