💾 Archived View for sdf.org › blippy › arm.gmi captured on 2023-07-22 at 16:33:53. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

ARM assembly

Created 2023-01-05

Registers

Register Synonym Special Role in the procedure call standard

r15 PC The Program Counter.

r14 LR The Link Register.

r13 SP The Stack Pointer.

r12 IP The Intra-Procedure-call scratch register.

r11 v8 FP ARM-state variable-register 8. ARM-state frame pointer.

r10 v7 SL ARM-state variable-register 7. Stack Limit pointer in stack-checked variants.

r9 v6 SB ARM-state v-register 6. Static Base in PID,/re-entrant/shared-library variants

r8 v5 ARM-state variable-register 5.

r7 v4 WR Variable register (v-register) 4. Thumb-state Work Register.

r6 v3 Variable register (v-register) 3.

r5 v2 Variable register (v-register) 2.

r4 v1 Variable register (v-register) 1.

r3 a4 Argument/result/scratch register 4.

r2 a3 Argument/result/ scratch register 3.

r1 a2 Argument/result/ scratch register 2.

r0 a1 Argument/result/ scratch register 1.

r0-r3 For passing parameters in and out. Can also be used as scratch registers. Caller should assume callee modifies the values.

r4-r11 used to hold values of routine's local variables. Callee must restore thir values before return to caller.

r12-r15 have special roles

ARM-THUMB procedure call standard, Cornell. PDF