RX610 Group
2. CPU
R01UH0032EJ0120 Rev.1.20
Page 68 of 1006
Feb 20, 2013
2.5
Endian
For the RX CPU, instructions are always little endian, but the treatment of data is selectable as little or big endian.
2.5.1
Switching the Endian
As arrangements of bytes, the RX610 Group supports both big endian, where the higher-order byte (MSB) is at location 0,
and little endian, where the lower-order byte (LSB) is at location 0.
The endian is switched by changing the setting on a mode pin (MDE). For details on the endian setting, see section 3,
Operating Modes.
Operations for access differ according to the endian setting and, depending on the instruction, whether 8-, 16- or 32-bit
access has been selected. Operations for access in the various possible cases are described in tables 2.1 to 2.12.
In the tables, LL indicates bits D7 to D0 of the general register,
LH indicates bits D15 to D8 of the general register,
HL indicates bits D23 to D16 of the general register, and
HH indicates bits D31 to D24 of the general register.
D31 to D24
D23 to D16
D15 to D8
D7 to D0
General purpose register: Rm
HH
HL
LH
LL
Table 2.1 32-Bit Read Operations when Little Endian has been Selected
Operation
Address of src
Reading a 32-bit unit
from address 0
Reading a 32-bit unit
from address 1
Reading a 32-bit unit
from address 2
Reading a 32-bit unit
from address 3
Reading a 32-bit unit
from address 4
Address 0
Transfer to LL
Address 1
Transfer to LH
Transfer to LL
Address 2
Transfer to HL
Transfer to LH
Transfer to LL
Address 3
Transfer to HH
Transfer to HL
Transfer to LH
Transfer to LL
Address 4
Transfer to HH
Transfer to HL
Transfer to LH
Transfer to LL
Address 5
Transfer to HH
Transfer to HL
Transfer to LH
Address 6
Transfer to HH
Transfer to HL
Address 7
Transfer to HH