Download Print this page

Data Format - Renesas M32R-FPU Software Manual

32-bit risc single-chip microcomputer

Advertisement

1

1.6.2 Data Format

(1) Data format in a register
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 into 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 >
< store >
Figure 1.6.2 Data Format in a Register
sign-extention (LDB instruction) or
zero-extention (LDUB instruction)
b0
Rn
sign-extention (LDH instruction) or
zero-extention (LDUH instruction)
b0
Rn
from memory (LD instruction)
b0
Rn
b0
Rn
b0
Rn
b0
Rn
CPU PROGRAMMING MODEL
(LDB, LDUB instruction)
24
from memory (LDH, LDUH instruction)
16
halfword
word
24
to memory (STB instruction)
16
halfword
to memory (STH instruction)
word
to memory (ST instruction)
1-13
M32R-FPU Software Manual (Rev.1.01)
1.6 Data Format
from memory
b31
byte
b31
b31
b31
byte
b31
b31

Advertisement

loading