107
CPU System Functions
Chapter 3
Preliminary User’s Manual U17566EE1V2UM00
3.2.2
System register set
System registers control the status of the CPU and hold interrupt information.
Additionally, the program counter holds the instruction address during program
execution.
To read/write the system registers, use instructions LDSR (load to system
register) or STSR (store contents of system register), respectively, with a
specific system register number (regID) indicated below.
The program counter states an exception. It cannot be accessed via LDSR or
STSR instructions. No regID is allocated to the program counter.
Example
STSR 0, r2
Stores the contents of system register 0 (EIPC) in general purpose register r2.
System register
numbers
The table below gives an overview of all system registers and their system
register number (regID). It shows whether a load/store instruction is allowed (
×
)
for the register or not (
–
).
Table 3-3
System register numbers
regID
System register name
Shortcut
Operand specification
LDSR
STSR
0
Status saving register during interrupt
(stores contents of PC)
EIPC
×
×
1
Status saving register during interrupt
(stores contents of PSW)
EIPSW
×
×
2
Status saving register during non-maskable interrupts
(stores contents of PC)
FEPC
×
×
3
Status saving register during non-maskable interrupts
(stores contents of PSW)
FEPSW
×
×
4
Interrupt source register
ECR
–
×
5
Program status word
PSW
×
×
6 to 15
Reserved (operations that access these register numbers
cannot be guaranteed).
–
–
16
Status saving register during CALLT execution
(stores contents of PC)
CTPC
×
×
17
Status saving register during CALLT execution
(stores contents of PSW)
CTPSW
×
×
18
Status saving register during exception/debug trap
(stores contents of PC)
DBPC
×
a
a)
Reading from this register is only enabled between a DBTRAP exception (exception handler address
0000 0060
H
) and the exception handler terminating DBRET instruction. DBTRAP exceptions are generated
upon ILGOP and ROM Correction detections (refer to
“Interrupt Controller (INTC)“ on page 187
and
“ROM
Correction Function (ROMC)“ on page 331
).
×
19
Status saving register during exception/debug trap
(stores contents of PSW)
DBPSW
×
a
×
20
CALLT base pointer
CTBP
×
×
21 to 31
Reserved (operations that access these register numbers
cannot be guaranteed).
–
–
electronic components distributor