5
INSTRUCTION SET
28
EPSON
S1C33 FAMILY C33 PE CORE MANUAL
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
register. 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
To extend to
rs
+
imm13
, enter one
ext
instruction directly before the target instruction.
Example:
ext
imm13
add
%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 0
0
0
0
0
0
0
0
31
13 12
imm13
0
Immediate
31
Data
0
rs
31
Data +
imm13
0
rd
Extending to
rs
+
imm26
To extend to
rs
+
imm26
, 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
+
imm26
+
0
0
0
0
0
0
31
13 12
26 25
imm13
(2)
imm13
(1)
0
Immediate
31
Data
0
rs
31
Data +
imm26
0
rd