Rev. 5.00, 09/03, page 25 of 760
2.2
Data Formats
2.2.1
Data Format in Registers
Register operands are always longwords (32 bits, figure 2.6). When a memory operand is only a
byte (8 bits) or a word (16 bits), it is sign-extended into a longword when loaded into a register.
Longword
31
0
Figure 2.6 Longword
2.2.2
Data Format in Memory
Memory data formats are classified into bytes, words, and longwords. Memory can be accessed in
8-bit byte, 16-bit word, or 32-bit longword form. A memory operand less than 32 bits in length is
sign-extended before being stored in a register.
A word operand must be accessed starting from a word boundary (even address of a 2-byte unit:
address 2n), and a longword operand starting from a longword boundary (even address of a 4-byte
unit: address 4n). An address error will result if this rule is not observed. A byte operand can be
accessed from any address.
Big-endian or little-endian byte order can be selected for the data format. The endian mode should
be set with the MD5 external pin in a power-on reset. Big-endian mode is selected when the MD5
pin is low, and little-endian when high. The endian mode cannot be changed dynamically. Bit
positions are numbered left to right from most-significant to least-significant. Thus, in a 32-bit
longword, the leftmost bit, bit 31, is the most significant bit and the rightmost bit, bit 0, is the least
significant bit.
The data format in memory is shown in figure 2.7.
Longword
Longword
31
0
15
23
7
Byte0 Byte1 Byte2 Byte3
Word1
Big-endian mode
Word0
Address A + 4
Address A + 8
Address A + 4
Address A
Address A
Address A + 1 Address A + 3
31
0
15
23
7
Byte3 Byte2 Byte1 Byte0
Word0
Little-endian mode
Word1
Address A + 11
Address A + 10 Address A + 8
Address A
Address A + 8
Address A + 9
Address A + 2
Figure 2.7 Data Format in Memory
Содержание SH7709S
Страница 2: ......
Страница 44: ...Rev 5 00 09 03 page xliv of xliv ...
Страница 62: ...Rev 5 00 09 03 page 18 of 760 ...
Страница 128: ...Rev 5 00 09 03 page 84 of 760 ...
Страница 146: ...Rev 5 00 09 03 page 102 of 760 ...
Страница 224: ...Rev 5 00 09 03 page 180 of 760 ...
Страница 246: ...Rev 5 00 09 03 page 202 of 760 ...
Страница 266: ...Rev 5 00 09 03 page 222 of 760 ...
Страница 370: ...Rev 5 00 09 03 page 326 of 760 ...
Страница 432: ...Rev 5 00 09 03 page 388 of 760 ...
Страница 532: ...Rev 5 00 09 03 page 488 of 760 ...
Страница 598: ...Rev 5 00 09 03 page 554 of 760 ...
Страница 630: ...Rev 5 00 09 03 page 586 of 760 ...
Страница 656: ...Rev 5 00 09 03 page 612 of 760 ...
Страница 684: ...Rev 5 00 09 03 page 640 of 760 ...
Страница 700: ...Rev 5 00 09 03 page 656 of 760 ...
Страница 758: ...Rev 5 00 09 03 page 714 of 760 ...
Страница 807: ...SH7709S Group Hardware Manual REJ09B0081 0500O ADE 602 250C ...