![Epson S1C17 Series Скачать руководство пользователя страница 33](http://html.mh-extra.com/html/epson/s1c17-series/s1c17-series_manual_107781033.webp)
S1C17 CORE MANUAL
Seiko Epson Corporation
5-11
(Rev. 1.2)
5.3.4 Extension of Register Indirect Addressing with Displacement
Extending
[%sp+imm7]
displacement
The immediate (
imm7
) in displacement-added register indirect addressing instructions is extended.
The extended data and the SP are added to comprise the source or destination address of transfer.
Extending to a 20-bit immediate
To extend the immediate to 20-bit quantity, enter one
ext
instruction directly before the target instruction.
Example:
ext imm13
ld %rd,[%sp+imm7]
; = ld %rd,[%sp+imm20]
+
Immediate
23
Stack pointer
0
SP
0 0
0
0
23
20 19
imm13
7
imm7
6
0
Extending to a 24-bit immediate
To extend the immediate to 24-bit quantity, enter two
ext
instructions directly before the target instruction.
Example:
ext imm13
(1)
ext imm13
(2)
ld %rd,[%sp+imm7]
; = ld %rd,[%sp+imm24]
imm13
(3:0)
(1)
23
20 19
imm13 (2)
7
imm7
6
0
Immediate
+
23
Stack pointer
0
SP
5.3.5 Extension of Signed PC Relative Addressing
Extending the displacement of PC relative branch instructions
The
sign7
immediate in PC relative branch instructions is extended to a signed 21-bit or a signed 24-bit im-
mediate. The
sign7
immediate in PC relative branch instructions is multiplied by 2 for conversion to a relative
value for the jump address, and the derived value is then added to PC to determine the jump address. The
ext
instructions extend this relative jump address value.
Extending to a 21-bit immediate
To extend the
sign7
immediate to a 21-bit immediate, enter one
ext
instruction directly before the target in-
struction.
Example:
ext imm13
jrgt sign7
; = jrgt sign21
S S S S
+
0
0
0
23
21 20
8 7
imm13
sign7
0
Immediate
23
Current address
0
PC
23
New address
0
1
PC
The most significant bit “S” in the immediate that has been extended by the
ext
instruction is the sign, with
which bits 23–21 are extended to become signed 21-bit data. The most significant bit in
sign7
is handled as the
MSB data of 7-bit data, and not as the sign.