Renesas SH7781 User Manual

Page 79

Advertising
background image

3. Instruction Set

Rev.1.00 Jan. 10, 2008 Page 49 of 1658

REJ09B0261-0100

Addressing
Mode

Instruction
Format

Effective Address Calculation Method

Calculation
Formula

GBR indirect
with displace-
ment

@(disp:8,
GBR)

Effective address is register GBR contents with
8-bit displacement disp added. After disp is
zero-extended, it is multiplied by 1 (byte), 2 (word),
or 4 (longword), according to the operand size.

GBR

1/2/4

GBR

+ disp

Ч 1/2/4

+

Ч

disp

(zero-extended)

Byte: GBR +
disp

→ EA

Word: GBR +
disp

× 2 → EA

Longword:
GBR + disp

×

4

→ EA

Indexed GBR
indirect

@(R0, GBR)

Effective address is sum of register GBR and R0
contents.

GBR

R0

GBR + R0

+

GBR + R0

EA

PC-relative
with
displacement

@(disp:8, PC) Effective address is PC + 4 with 8-bit displacement

disp added. After disp is zero-extended, it is
multiplied by 2 (word), or 4 (longword), according
to the operand size. With a longword operand,
the lower 2 bits of PC are masked.

PC

H'FFFF FFFC

PC + 4 + disp

× 2

or PC &

H'FFFF FFFC

+ 4 + disp

Ч 4

+

4

2/4

Ч

+

& *

disp

(zero-extended)

* With longword operand

Word: PC + 4
+ disp

× 2 →

EA

Longword:
PC & H'FFFF
FFFC + 4 +
disp

× 4 → EA

Advertising