![Epson S1C17 Series Скачать руководство пользователя страница 30](http://html.mh-extra.com/html/epson/s1c17-series/s1c17-series_manual_107781030.webp)
5-8
Seiko Epson Corporation
S1C17 CORE MANUAL
(REV. 1.2)
5.3 Addressing Modes with
ext
The immediate specifiable in 16-bit, fixed-length instruction code is specified in a bit field of a 7- or 10-bit length,
depending on the instruction used. The
ext
instructions are used to extend the size of this immediate.
The
ext
instructions are used in combination with data transfer, arithmetic/logic, or branch instructions, and is
placed directly before the instruction whose immediate needs to be extended. The instruction is expressed in the
form
ext imm13
, in which the immediate size extendable by one
ext
instruction is 13 bits and up to two
ext
instructions can be written in succession to extend the immediate further.
The
ext
instructions are effective only for the instructions for which the immediate extension written directly after
ext
is possible, and have no effect for all other instructions. When three or more
ext
instructions have been de-
scribed sequentially, the last two are effective and others are ignored.
When an instruction, which does not support the extension in the
ext
instruction, follows an
ext
, the
ext
instruc-
tion will be executed as a
nop
instruction.
5.3.1 Extension of Immediate Addressing
Extension of imm7
The
imm7
immediate is extended to a 16-, 20-, or 24-bit immediate.
Extending to a 16-bit immediate
To extend the immediate to 16-bit quantity, enter one
ext
instruction directly before the target instruction.
Example:
ext imm13
add %rd,imm7
; = add %rd,imm16
Extended immediate
15
imm13
(8:0)
7
imm7
6
0
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
add.a %rd,imm7 ; = add.a %rd,imm20
Extended immediate
0 0
0
0
23
20 19
imm13
7
imm7
6
0
Bits 23–20 are filled with 0 (zero-extension).
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,[imm7] ; = ld %rd,[imm24]
Extended immediate
imm13
(3:0)
(1)
23
20 19
imm13 (2)
7
imm7
6
0