Directives Reference
7-40 Copyright © 2000, 2001 ARM Limited. A ll rights reserved. ARM DUI 0068B
7.5.7 FRAME STATE REMEMBER
The
FRAME STATE REMEMBER
directive saves the current inf ormation on how to calculate
the canonical frame address and locations of saved register values. You can only use it
within functions wi th
FUNCTION
and
ENDFUNC
or
PROC
and
ENDP
directives.
Syntax
FRAME STATE REMEMBER
Usage
During an inline exit sequence the information about calculation of canonical frame
address and locations of saved register values can change. After the exit sequence
another branch can continue using the same information as before. Use
FRAME STATE
REMEMBER
to preserve this information, and
FRAME STATE RESTORE
to restore it.
These directives can be nested. Each
FRAME STATE RESTORE
directive must have a
corresponding
FRAME STATE REMEMBER
directive. See:
FRAME STATE RESTORE on page 7-41
FUNCTION or PROC on page 7-42.
Example
; function code
FRAME STATE REMEMBER
; save frame state before in-line exit sequence
LDMFD sp!,{r4-r6,pc}
; no need to FRAME POP here, as control has
; transferred out of the function
FRAME STATE RESTORE
; end of exit sequence, so restore state
exitB ; code for exitB
LDMFD sp!,{r4-r6,pc}
ENDP