Section 2 Programming Model
SH7751 Group, SH7751R Group
Page 48 of 1128
R01UH0457EJ0301 Rev. 3.01
Sep 24, 2013
2.2
Register Configuration
2.2.1
Privileged Mode and Banks
Processor Modes:
The SH-4 has two processor modes, user mode and privileged mode. The SH-4
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.
Содержание SH7751 Group
Страница 2: ...Page ii of liv R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 30: ...Page xxx of liv R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 46: ...Page xlvi of liv R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 54: ...Page liv of liv R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 190: ...Section 4 Caches SH7751 Group SH7751R Group Page 136 of 1128 R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 226: ...Section 5 Exceptions SH7751 Group SH7751R Group Page 172 of 1128 R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 264: ...Section 7 Instruction Set SH7751 Group SH7751R Group Page 210 of 1128 R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 320: ...Section 9 Power Down Modes SH7751 Group SH7751R Group Page 266 of 1128 R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 344: ...Section 10 Clock Oscillation Circuits SH7751 Group SH7751R Group Page 290 of 1128 R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 388: ...Section 12 Timer Unit TMU SH7751 Group SH7751R Group Page 334 of 1128 R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 800: ...Section 17 Smart Card Interface SH7751 Group SH7751R Group Page 746 of 1128 R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 848: ...Section 19 Interrupt Controller INTC SH7751 Group SH7751R Group Page 794 of 1128 R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 876: ...Section 20 User Break Controller UBC SH7751 Group SH7751R Group Page 822 of 1128 R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 1036: ...Section 22 PCI Controller PCIC SH7751 Group SH7751R Group Page 982 of 1128 R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 1152: ...Appendix C Mode Pin Settings SH7751 Group SH7751R Group Page 1098 of 1128 R01UH0457EJ0301 Rev 3 01 Sep 24 2013 ...
Страница 1185: ......
Страница 1186: ... SH7751 Group SH7751R Group User s Manual Hardware R01UH0457EJ0301 Previous Number REJ09B0370 0400 ...