Register Set

There are two types of registers, general registers and control registers, explained below.

General Registers

There are 16 general purpose registers, each 32 bits wide. They are used to hold source operand data and computation results. Although only r0 has a special function at the hardware level, a convention has been established whereby the following MCore general registers have reserved functions at the software level:
Register Name(s) Usage
r0
Stack pointer
r1
Scratch register
r2-r3
Parameter registers, return value
r4-r7
Parameter registers
r8-r13
Permanent registers
r14
Permanent register, frame pointer
r15
Link pointer

The jsr instruction overwrites the contents of register r15 with the return address generated by the call. However, the contents of r15 may also be overwritten by software if required.

Control Registers

There are 32 control registers, each 32-bits wide:
Name Usage
PSR
Processor status register
VBR
Vector base register
EPSR, FPSR, EPC, FPC
Exception shadow registers
SS0-SS4
Supervisor storage registers
GCR
Global central register
GSR
Global status register
CR13-CR31
Reserved

Control registers can be loaded and stored from via the mfcr and mtcr, respectively. For a detailed description of the purpose of each of these registers, please refer to the MCore Programming Manual.


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.