English
Language : 

SH7020 Datasheet, PDF (39/509 Pages) Renesas Technology Corp – SuperH™ RISC engine
31
0
Long word
Figure 2.4 Data Format in Registers
2.2.2 Data Format in Memory
Memory data formats are classified into bytes, words, and long words. Byte data can be accessed
from any address, but an address error will occur if you try to access word data starting from an
address other than 2n or long word data starting from an address other than 4n. In such cases, the
data accessed cannot be guaranteed. The hardware stack area, which is referred to by the hardware
stack pointer (SP, R15), uses only long word data starting from address 4n because this area stores
the program counter and status register (figure 2.5).
Address 2n
Address 4n
Address m + 1
Address m + 3
Address m
Address m + 2
31
23
15
7
0
7 Byte 0 7 Byte 0 7 Byte 0 7 Byte 0
15 Word
0 15 Word
0
31
Long word
0
Figure 2.5 Data Format in Memory
2.2.3 Immediate Data Format
Byte (8-bit) immediate data is located in the instruction code. Immediate data accessed by the
MOV, ADD, and CMP/EQ instructions is sign-extended and is handled in registers as long word
data. Immediate data accessed by the TST, AND, OR, and XOR instructions is zero-extended and
is handled as long word data. Consequently, AND instructions with immediate data always clear
the upper 24 bits of the destination register.
Word or long word immediate data is not located in the instruction code but rather is stored in a
memory table. The memory table is accessed by a immediate data transfer instruction (MOV)
using the PC relative addressing mode with displacement.
18 RENESAS