English
Language : 

SH7101 Datasheet, PDF (50/486 Pages) Renesas Technology Corp – 32-Bit RISC Microcomputer
2. CPU
2.3.2 Data Formats in Memory
Memory data formats are classified into bytes, words, and longwords. Byte data can be accessed
from any address. Locate, however, word data at an address 2n, longword data at 4n. Otherwise,
an address error will occur if an attempt is made to access word data starting from an address other
than 2n or longword data starting from an address other than 4n. In such cases, the data accessed
cannot be guaranteed. The hardware stack area, pointed by the hardware stack pointer (SP, R15),
uses only longword data starting from address 4n because this area holds the program counter and
status register.
Address 2n
Address 4n
Address m + 1
Address m + 3
Address m
Address m + 2
31
23
15
7
0
Byte
Byte
Byte
Byte
Word
Word
Longword
Figure 2.3 Data Formats in Memory
2.3.3 Immediate Data Format
Byte (8 bit) immediate data resides in an instruction code. Immediate data accessed by the MOV,
ADD, and CMP/EQ instructions is sign-extended and handled in registers as longword data.
Immediate data accessed by the TST, AND, OR, and XOR instructions is zero-extended and
handled as longword data. Consequently, AND instructions with immediate data always clear the
upper 24 bits of the destination register.
Word or longword immediate data is not located in the instruction code, but instead is stored in a
memory table. An immediate data transfer instruction (MOV) accesses the memory table using the
PC relative addressing mode with displacement.
Rev.2.00 Sep. 27, 2007 Page 16 of 448
REJ09B0394-0200