Rev. 1.50, 10/04, page 202 of 448
10.1 CPU instruction
Note: Of the SH-4A's section, CPU instructions, those which support the FPU or differ
functionally from those of the SH4AL-DSP are described in section 10.2, CPU
instructions (FPU Related). The other instructions are described in section 10.1, CPU
instructions.
The following resources and functions are used in C-language descriptions of the operation of
CPU instructions.
char 8-bit integer
short 16-bit integer
int 32-bit integer
long 64-bit integer
float single-precision floating point number(32 bits)
double double-precision floating point number(64 bits)
These are data types.
unsigned char Read_Byte(unsigned long Addr);
unsigned short Read_Word(unsigned long Addr);
unsigned long Read_Long(unsigned long Addr);
These reflect the respective sizes of address Addr. A word read from other than a 2n address, or a
longword read from other than a 4n address, will be detected as an address error.
unsigned char Write_Byte(unsigned long Addr, unsigned long Data);
unsigned short Write_Word(unsigned long Addr, unsigned long Data);
unsigned long Write_Long(unsigned long Addr, unsigned long Data);
These write data Data to address Addr, using the respective sizes. A word write to other than a 2n address,
or a longword write to other than a 4n address, will be detected as an address error.
Delay_Slot(unsigned long Addr);
Shifts to execution of the slot instruction at address (Addr).
unsigned long R[16];
unsigned long SR,GBR,VBR;
unsigned long MACH,MACL,PR;
unsigned long PC;
Registers