Renesas M32R/ECU Series User Manual page 46

Mitsubishi 32-bit risc single-chip microcomputers
Table of Contents

Advertisement

2
2.6.2 Data Formats
(1) Data formats in registers
The data sizes in the M32R-FPU registers are always words (32 bits).
When loading byte (8-bit) or halfword (16-bit) data from memory into a register, the data is sign-extended
(LDB, LDH instructions) or zero-extended (LDUB, LDUH instructions) to a word (32-bit) quantity before
being loaded in the register.
When storing data from a register into a memory, the 32-bit data, the 16-bit data on the LSB side and the 8-
bit data on the LSB side of the register are stored into memory by the ST, STH and STB instructions,
respectively.
<Load>
Rn
Rn
Rn
<Store>
Rn
Rn
Rn
Figure 2.6.2 Data Formats in Registers
Sign-extended (LDB instruction) or
zero-extended (LDUB instruction)
b0
Sign-extended (LDH instruction) or
zero-extended (LDUH instruction)
b0
From memory (LD instruction)
b0
b0
b0
b0
To memory (ST instruction)
From memory
(LDB, LDUB instructions)
24
Byte
From memory (LDH, LDUH instructions)
16
Halfword
Word
24
Byte
To memory (STB instruction)
16
Halfword
To memory (STH instruction)
Word
32180 Group User's Manual (Rev.1.0)
2-9
CPU
2.6 Data Formats
b31
b31
b31
b31
b31
b31

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents