In terms of registers, SH-4 offers the following:
- 16 general registers R0-R15 (32-bit)
- 7 control registers (32-bit):
- Global Base Register (GBR)
- Status Register (SR)
- Saved Status Register (SSR)
- Saved Program Counter (SPC)
- Vector Base Counter (VBR)
- Saved General Register 15 (SGR)
- Debug Base Register (DBR) (only from the privileged mode)
- 4 system registers (32-bit):
- MACH/MACL: Multiply-and-accumulate registers
- PR: Procedure register
- PC: Program counter
- FPSCR: Floating-point status/control register
- 32 FPU registers FR0-FR15 (also known as DR0/2/4/... or FV0/4/...) and XF0-XF15 (also known as XD0/2/4/... or XMTRX); two banks of either 16 single-precision (32-bit) or eight double-precision (64-bit) FPRs and FPUL (floating-point communication register) (32-bit)
Usually, R4-R7 are used to pass arguments to a function with the result returned in R0. R8-R13 are saved across multiple function calls. R14 serves as the frame pointer and R15 as a stack pointer.
Regarding the data formats...