← New search

Other meanings of Processor register

COMPUTER ARCHITECTURE

Processor register

A processor register is a small amount of high-speed storage within a computer processor. Registers hold operands, addresses, instructions, status information, or intermediate results that the arithmetic and control circuitry can access more quickly than data in main memory.1 Their number, width, names, and permitted operations are defined by a processor's instruction set architecture, while additional internal registers may be invisible to software.

Bytes to hundreds of bytes
Typical visible register storage
varies by architecture
32, 64, or more bits
Common register width
matches data or address size
One or more per instruction
Values commonly read or written
depends on instruction format
1

Role and organization

Registers provide the processor's fastest directly usable storage for an instruction's immediate work. A processor may read register operands, perform an arithmetic or logical operation, and write the result to another register without accessing main memory. This arrangement reduces dependence on the slower memory hierarchy, although modern processors also use caches and internal temporary storage.

Some registers are general-purpose, meaning that ordinary instructions can use them for several roles. Others are specialized: the program counter identifies the next instruction, the stack pointer tracks a procedure's stack, and a condition code register records results such as zero, carry, negative, or overflow. Register contents are usually lost when power is removed.

2

Kinds and instruction use

Registers differ according to the information they hold and the instructions that may access them. General-purpose registers commonly contain integers, addresses, or pointers; floating-point and vector registers hold numerical values arranged for parallel operations; control registers configure execution or memory protection. An instruction may also contain an immediate constant, which is encoded in the instruction itself rather than stored in a register.

The instruction set architecture specifies the programmer-visible register set, including register width, numbering, calling conventions, and special behavior.1 Assembly-language names expose these choices, while compilers allocate registers to frequently used values. When available registers are insufficient, the compiler or operating system spills values to memory, a process that can reduce performance.

3

Architectural examples and trade-offs

Different instruction set architectures make different compromises between register count, instruction size, and implementation complexity. RISC-V defines a regular set of integer registers and separate register classes for extensions such as floating-point operations.2 The ARM architecture likewise provides general-purpose registers alongside special registers and optional vector or matrix facilities.3

Intel 64 processors provide general-purpose registers, instruction-pointer and flags registers, plus specialized control and vector registers.1 More registers can reduce memory traffic, but register identifiers consume instruction bits and additional register storage requires circuitry for reading, writing, renaming, and preserving values during context switches.

4

Lesser-known aspects

Visible registers are only part of the storage used inside a modern processor. Out-of-order designs commonly apply register renaming, mapping architectural registers to larger pools of physical registers so independent instructions can proceed without false dependencies; these physical registers are normally hidden from programs.

Some architectures expose unusual register behavior. A register may be read-only, write-only, conditionally accessible, banked by privilege level, or tied to a particular instruction mode. Floating-point status and control registers can preserve rounding and exception state, while vector registers may be viewed as several smaller lanes or as one wide value. During an operating-system context switch, only the register state relevant to a task must be saved, and lazy or selective saving can avoid unnecessary work.

  • Register width does not always equal the processor's physical internal width.
  • A zero register, present in some architectures, always reads as zero and discards writes.
  • Register names and roles are architectural conventions, not universal standards.2

Glossary

Architectural register
A register defined by the instruction set architecture and visible, directly or indirectly, to software.
General-purpose register
A register usable for several ordinary data, address, or pointer operations.
Program counter
The register or architectural state that identifies the instruction being fetched or executed next.
Register renaming
A hardware technique that maps architectural registers to physical registers to support parallel and out-of-order execution.
Spill
The movement of a register value to memory when register storage is needed for another value.

Register terminology varies among architectures; this entry uses the broad architectural meaning of small, processor-resident storage and distinguishes it from hidden physical registers.