2 data format, Cpu programming model, 6 data format – Renesas M32R-FPU User Manual

Page 21

Advertising
background image

1

1-13

M32R-FPU Software Manual (Rev.1.01)

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.

Rn

b0

b31

< load >

byte

Rn

b0

b31

halfword

Rn

b0

b31

word

sign-extention (LDB instruction) or
zero-extention (LDUB instruction)

from memory

(LDB, LDUB instruction)

< store >

Rn

b0

b31

byte

Rn

b0

b31

halfword

Rn

b0

b31

word

to memory (STB instruction)

to memory (STH instruction)

to memory (ST instruction)

from memory (LDH, LDUH instruction)

from memory (LD instruction)

24

16

24

16

sign-extention (LDH instruction) or
zero-extention (LDUH instruction)

Figure 1.6.2 Data Format in a Register

CPU PROGRAMMING MODEL

1.6 Data Format

Advertising