Share via


ARM Registers

9/7/2007

The ARM microprocessor has 16 general-purpose registers.

THUMB has eight general-purpose registers, R0-R7, and access to the high registers, R8-R15.

The following table shows the assigned register roles.

Register Description

R0

Argument1, Return Value

Temporary register

R1

Argument2, Second 32-bits if double or 64-bit int return value

Temporary register

R2-R3

Arguments

Temporary registers

R4-R10

R7 is THUMB frame pointer

Permanent registers.

R11

ARM frame pointer

Permanent register

R12

Temporary register

R13

Stack pointer

Permanent register

R14

Link register

Permanent register

R15

Program Counter

Note that registers R0 through R3 hold the first four words of incoming arguments. The microprocessor constructs remaining arguments in the calling function's argument build area, which does not provide space into which R0 through R3 can be spilled.

The following table shows additional predefined registers for Vector Floating Point (VFP) and for WMMX.

Register Description

s0-s31

VFP single-precision registers. Registers s16-s31 are permanent registers.

d0-d15

VFP double-precision registers. Registers d8-d15 are permanent registers.

fpsid

VFP system ID register

fpscr

VFP status and control register

fpexc

VFP exception register

wr0-wr16

WMMX SIMD data registers

wc0-wc16

WMMX status and control registers

wcid

WMMX coprocessor ID register, synonymous with wc0

wcon

WMMX control register, synonymous with wc1

wcssf

WMMX saturation SIMD flags, synonymous with wc2

wcasf

WMMX arithmetic SIMD flags, synonymous with wc3

wcgr0-wcgr3

WMMX control general-purpose registers, synonymous with wc8-wc11

See Also

Reference

ARM Assembler Macros

Concepts

ARM Stack Frame Layout