2.1.2. Stacks

The processor uses a full descending stack. This means that the stack pointer holds the address of the last stacked item in memory. When the processor pushes a new item onto the stack, it decrements the stack pointer and then writes the item to the new memory location. The processor implements two stacks, the main stack and the process stack, with a pointer for each held in independent registers, see Stack Pointer.

In Thread mode, the CONTROL register controls whether the processor uses the main stack or the process stack, see CONTROL register. In Handler mode, the processor always uses the main stack. The options for processor operations are:

Table 2.1. Summary of processor mode, execution privilege level, and stack use options

Processor modeUsed to executePrivilege level for software executionStack used
ThreadApplicationsPrivileged or unprivileged [a]Main stack or process stack [a]
HandlerException handlersAlways privilegedMain stack

Copyright © 2015, 2018 Arm. All rights reserved.ARM DUI 0646C