From 2110dc5a6dc9de415e8f4dda75262d4b98d1f0a4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 25 Jun 2015 00:21:35 +0100 Subject: docs: Add reference for Thumb2 inline assembler. Thanks to Peter Hinch for contributing this. --- docs/reference/asm_thumb2_stack.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/reference/asm_thumb2_stack.rst (limited to 'docs/reference/asm_thumb2_stack.rst') diff --git a/docs/reference/asm_thumb2_stack.rst b/docs/reference/asm_thumb2_stack.rst new file mode 100644 index 000000000..bffbab277 --- /dev/null +++ b/docs/reference/asm_thumb2_stack.rst @@ -0,0 +1,20 @@ +Stack push and pop +================== + +Document conventions +-------------------- + +The ``push()`` and ``pop()`` instructions accept as their argument a register set containing +a subset, or possibly all, of the general-purpose registers R0-R12 and the link register (lr or R14). +As with any Python set the order in which the registers are specified is immaterial. Thus the +in the following example the pop() instruction would restore R1, R7 and R8 to their contents prior +to the push(): + +* push({r1, r8, r7}) Save three registers on the stack. +* pop({r7, r1, r8}) Restore them + +Stack operations +---------------- + +* push({regset}) Push a set of registers onto the stack +* pop({regset}) Restore a set of registers from the stack -- cgit v1.2.3