13.8.11. Understanding the register view

ARM processors support up to seven processor modes depending on the architecture version, for example User (USR), SuperVisor Call (SVC), and FIQ. All modes, except User mode, are referred to as privileged modes.

ARM processors have thirty-seven registers arranged in partially overlapping banks. There is a different register bank for each processor mode, for example USER or FIQ. Using banked registers gives rapid context switching for dealing with processor exceptions and privileged operations.

RealView Debugger displays registers in named groups to reflect how registers are banked. For example USR and FIQ for an ARM966E-S processor, shown in Figure 13.24.

Figure 13.24. Viewing registers

Viewing registers

At first sight, it might appear that some registers are missing or that extra registers are visible for different processor modes. For example, FIQ contains R8, R9, R10, R11, R12, SP, LR, and SPSR. These are the registers in the bank for that processor mode that are banked out when an FIQ exception occurs.

However, USR also contains R8, R9, R10, R11, R12, SP, and LR. These are banked out registers indirectly accessible with LDM and STM instructions of the form:

LDM rX, (r8-r14)^
STM rX, (r8-r14)^

These examples use the ^ suffix to specify that data is transferred into or out of the USR mode registers. The register list must not contain the PC.

You must load banked out registers from memory to modify them, and you must store them to memory to read them. However, they might be of interest when writing task context switch code or a coprocessor emulator.

Display colors in the Registers view

When using the Registers view to see register contents, RealView Debugger uses color to make the display easier to read and to highlight significant events:

  • Black indicates values that are unchanged for the previous two updates

  • Dark blue shows those values that have changed since the last update

  • Light blue indicates a value that changed at the previous update

  • Yellow indicates that the register is a read-only register

  • Black -- indicates a write-only register

  • Red !! indicates:

    • the address of a memory mapped register is in an area of memory that does not exist on the target

    • there has been a failure accessing the register.

See also

  • the following for details of the LDM and STM instructions:

    • ARM® Compiler toolchain Assembler Reference

    • ARM® Compiler toolchain Developing Software for ARM® Processors.

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0153N