EasyManua.ls Logo

Renesas SuperH SH-4A - MOVA (Move Effective Address): Data Transfer Instruction

Renesas SuperH SH-4A
472 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rev. 1.50, 10/04, page 275 of 448
10.1.34 MOVA (Move Effective Address): Data Transfer Instruction
Format Operation Instruction Code Cycle T Bit
MOVA
@(disp*,PC),R0
disp × 4 + PC &
H'FFFFFFFC + 4 R0
11000111dddddddd 1 —
Note: * The assembler of Renesas Technology uses the value after scaling (×1, ×2, or ×4) as
the displacement (disp).
Description: This instruction stores the source operand effective address in general register R0.
The 8-bit displacement is multiplied by four after zero-extension. The PC value is the address of
this instruction, but a value with the lower 2 bits adjusted to B'00 is used in address calculation.
Notes: If this instruction is executed in a delay slot, a slot illegal instruction exception will be
generated.
Operation:
MOVA(int d) /* MOVA @(disp,PC),R0 */
{
unsigned int disp;
disp = (unsigned int)(0x000000FF & d);
R[0] = (PC&0xFFFFFFFC) + 4 + (disp<<2);
PC += 2;
}
Example:
Address .org H'1006
1006 MOVA STR*,R0 ;STR address R0
1008 MOV.B @R0,R1 ;R1 = “X” Position after adjustment of lower 2 bits of PC
100A ADD R4,R5
.align 4
100C STR:.sdata "XYZP12"
Note: * The assembler of Renesas Technology uses the value after scaling (×1, ×2, or ×4) as
the displacement (disp).
Possible Exceptions:
Slot illegal instruction exception

Table of Contents

Related product manuals