23.10.2014 Views

RealView - ARM Information Center

RealView - ARM Information Center

RealView - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

命 令 参 考<br />

示 例<br />

p PROC ; Canonical frame address is sp + 0<br />

EXPORT p<br />

STMFD sp!,{r4-r6,lr}<br />

; sp has moved relative to the canonical frame address,<br />

; and registers r4, r5, r6 and lr are now on the stack<br />

FRAME PUSH {r4-r6,lr}<br />

; Equivalent to:<br />

; FRAME ADDRESS sp,16 ; 16 bytes in {r4-r6,lr}<br />

; FRAME SAVE {r4-r6,lr},-16<br />

7.5.4 FRAME REGISTER<br />

使 用 FRAME REGISTER 命 令 保 存 寄 存 器 中 存 放 的 函 数 自 变 量 位 置 的 一 个 记 录 。 只 能<br />

在 包 含 FUNCTION 和 ENDFUNC 命 令 或 在 PROC 和 ENDP 命 令 的 函 数 内 使 用 它 。<br />

语 法<br />

FRAME REGISTER reg1,reg2<br />

其 中 :<br />

reg1 是 存 放 函 数 入 口 点 自 变 量 的 寄 存 器 。<br />

reg2 是 要 用 于 保 存 参 数 值 的 寄 存 器 。<br />

用 法<br />

当 使 用 一 个 寄 存 器 来 保 存 在 进 入 函 数 时 存 放 在 一 个 不 同 的 寄 存 器 中 的 自 变 量<br />

时 , 可 使 用 FRAME REGISTER 命 令 。<br />

7-38 © 2002、 2003 <strong>ARM</strong> Limited 版 权 所 有 。 保 留 所 有 权 利 。 <strong>ARM</strong> DUI 0204BSC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!