Rev. 3.0, 04/02, page 36 of 1064
2.2
Register Configuration
2.2.1
Privileged Mode and Banks
Processor Modes: The SH7751 Series has two processor modes, user mode and privileged mode.
The SH7751 Series normally operates in user mode, and switches to privileged mode when an
exception occurs or an interrupt is accepted. There are four kinds of registers—general registers,
system registers, control registers, and floating-point registers—and the registers that can be
accessed differ in the two processor modes.
General Registers: There are 16 general registers, designated R0 to R15. General registers R0 to
R7 are banked registers which are switched by a processor mode change.
In privileged mode, the register bank bit (RB) in the status register (SR) defines which banked
register set is accessed as general registers, and which set is accessed only through the load control
register (LDC) and store control register (STC) instructions.
When the RB bit is 1 (that is, when bank 1 is selected), the 16 registers comprising bank 1 general
registers R0_BANK1 to R7_BANK1 and non-banked general registers R8 to R15 can be accessed
as general registers R0 to R15. In this case, the eight registers comprising bank 0 general registers
R0_BANK0 to R7_BANK0 are accessed by the LDC/STC instructions. When the RB bit is 0 (that
is, when bank 0 is selected), the 16 registers comprising bank 0 general registers R0_BANK0 to
R7_BANK0 and non-banked general registers R8 to R15 can be accessed as general registers R0
to R15. In this case, the eight registers comprising bank 1 general registers R0_BANK1 to
R7_BANK1 are accessed by the LDC/STC instructions.
In user mode, the 16 registers comprising bank 0 general registers R0_BANK0 to R7_BANK0 and
non-banked general registers R8 to R15 can be accessed as general registers R0 to R15. The eight
registers comprising bank 1 general registers R0_BANK1 to R7_BANK1 cannot be accessed.
Control Registers: Control registers comprise the global base register (GBR) and status register
(SR), which can be accessed in both processor modes, and the saved status register (SSR), saved
program counter (SPC), vector base register (VBR), saved general register 15 (SGR), and debug
base register (DBR), which can only be accessed in privileged mode. Some bits of the status
register (such as the RB bit) can only be accessed in privileged mode.
System Registers: System registers comprise the multiply-and-accumulate registers
(MACH/MACL), the procedure register (PR), the program counter (PC), the floating-point
status/control register (FPSCR), and the floating-point communication register (FPUL). Access to
these registers does not depend on the processor mode.
Summary of Contents for SH7751
Page 39: ...Rev 3 0 04 02 page xxxviii of xxxviii ...
Page 89: ...Rev 3 0 04 02 page 50 of 1064 ...
Page 157: ...Rev 3 0 04 02 page 118 of 1064 ...
Page 193: ...Rev 3 0 04 02 page 154 of 1064 ...
Page 225: ...Rev 3 0 04 02 page 186 of 1064 ...
Page 253: ...Rev 3 0 04 02 page 214 of 1064 ...
Page 301: ...Rev 3 0 04 02 page 262 of 1064 ...
Page 343: ...Rev 3 0 04 02 page 304 of 1064 ...
Page 607: ...Rev 3 0 04 02 page 568 of 1064 ...
Page 671: ...Rev 3 0 04 02 page 632 of 1064 ...
Page 745: ...Rev 3 0 04 02 page 706 of 1064 ...
Page 767: ...Rev 3 0 04 02 page 728 of 1064 ...
Page 1061: ...Rev 3 0 04 02 page 1022 of 1064 NMI tNMIL tNMIH Figure 23 69 NMI Input Timing ...
Page 1069: ...Rev 3 0 04 02 page 1030 of 1064 ...
Page 1103: ...Rev 3 0 04 02 page 1064 of 1064 ...