![Epson S1C17 Series Manual Download Page 31](http://html.mh-extra.com/html/epson/s1c17-series/s1c17-series_manual_107781031.webp)
S1C17 CORE MANUAL
Seiko Epson Corporation
5-9
(Rev. 1.2)
Extension of sign7
The
sign7
immediate is extended to a 16-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
ld %rd,sign7
Extended immediate
S
15
imm13
(7:0)
7
sign7
6
0
Bit 8 of the
imm13
in the
ext
instruction is the sign, with the immediate extended to become signed
16-bit data. The most significant bit in
sign7
is handled as the MSB data of 7-bit data, and not as the
sign.
5.3.2 Extension of Register Direct Addressing
Extending register-to-register operation instructions
Register-to-register operation instructions are extended by one or two
ext
instructions. Unlike data transfer
instructions, these instructions add or subtract the content of the
rs
register and the immediate specified by an
ext
instruction according to the arithmetic operation to be performed. They then store the result in the
rd
reg-
ister. The content of the
rd
register does not affect the arithmetic operation performed. An example of how to
extend for an add operation is shown below.
Extending to rs + imm13 (for 16-bit and 24-bit
operation instructions)
To extend to
rs
+
imm13
, enter one
ext
instruction directly before the target instruction.
Example:
ext imm13
add.a %rd,%rs
If not extended,
rd
=
rd
+
rs
When extended by one
ext
instruction,
rd
=
rs
+
imm13
0 0 0 0 0 0 0
+
0 0 0 0
23
13 12
imm13
0
Immediate
23
Data
0
rs
23
Data + imm13
0
rd
Extending to rs + imm16 (for 16-bit
operation instructions)
To extend to
rs
+
imm16
, enter two
ext
instructions directly before the target instruction.
Example:
ext imm13
(1)
ext imm13
(2)
add %rd,%rs
If not extended,
rd
=
rd
+
rs
When extended by two
ext
instructions,
rd
=
rs
+
imm16
+
13 12
15
15
16
15
16
imm13 (2)
(1)
0
Immediate
23
Data
0
rs
Data + imm16
0
rd
imm13
(2:0)
X X X X X X X X
0 0 0 0 0 0 0 0
23