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
'
FF 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
Summary of Contents for SuperH SH-4A
Page 2: ...Rev 1 50 10 04 page ii of xx ...
Page 8: ...Rev 1 50 10 04 page viii of xx ...
Page 116: ...Rev 1 50 10 04 page 96 of 448 ...
Page 178: ...Rev 1 50 10 04 page 158 of 448 ...
Page 206: ...Rev 1 50 10 04 page 186 of 448 ...
Page 231: ...Rev 1 50 10 04 page 211 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 235: ...Rev 1 50 10 04 page 215 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 238: ...Rev 1 50 10 04 page 218 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 408: ...Rev 1 50 10 04 page 388 of 448 Possible Exceptions Inexact Not generated when FPSCR PR 1 ...
Page 446: ...Rev 1 50 10 04 page 426 of 448 ...
Page 468: ...Rev 1 50 10 04 page 448 of 448 ...
Page 471: ......
Page 472: ...SH 4A Software Manual ...