5
INSTRUCTION SET
40
EPSON
S1C33 FAMILY C33 PE CORE MANUAL
When extended by two
ext
instructions
ext
imm13
ext
imm13'
jp
sign8
Functions as
“
jp
sign32
”
The
imm13
specified by the first
ext
instruction is effective for only
10
bits, from bit
12
to bit
3
(with the
3
low-order bits ignored), so that
sign32
is configured as follows:
sign32
= {
imm13
[
12
:
3
],
imm13
',
sign8
,
0
}
0
31
22 21
9 8
imm13'
S
imm13
[12:3]
sign8
0
sign32
1
+
0
0
Current address
PC
Branch destination address
PC
The range of addresses to which jumped is (PC -
2
,
147
,
483
,
648
) to (PC +
2
,
147
,
483
,
646
).
The above range of addresses to which jumped is a theoretical value, and is actually limited by the range of
memory areas used.
For
jpr
branch
jpr
%rb
A signed
32
-bit relative value is specified for
rb
.
The jump address is configured as follows:
{
rb
[
31
:
1
],
0
}
31
S
W[31:1]
0
1
[
%rb
]
+
0
X
0
Current address
PC
Branch destination address
PC
The least significant bit in the
rb
register is always handled as
0
.
The range of addresses to which jumped is (PC -
2
,
147
,
483
,
648
) to (PC +
2
,
147
,
483
,
646
).
The above range of addresses to which jumped is a theoretical value, and is actually limited by the range of
memory areas used.
Branch conditions
The
jp
and
jpr
instructions are unconditional jump instructions that always cause the program to branch.
Instructions with names beginning with
jr
are conditional jump instructions for which the respective branch
conditions are set by a combination of flags, so that only when the conditions are satisfied do they cause the
program to branch to a specified address. The program does not branch unless the conditions are satisfied.
The conditional jump instructions basically use the result of the comparison of two values by the
cmp
instruction to determine whether to branch. For this reason, the name of each instruction includes a character
that represents relative magnitude.
The types of conditional jump instructions and branch conditions are listed in Table
5
.
14
.
1
.
1
.
Table
5
.
14
.
1
.
1
Conditional Jump Instructions and Branch Conditions
jrgt
jrge
jrlt
jrle
jrugt
jruge
jrult
jrule
jreq
jrne
Greater Than
Greater or Equal
Less Than
Less or Equal
Unsigned, Greater Than
Unsigned, Greater or Equal
Unsigned, Less Than
Unsigned, Less or Equal
Equal
Not Equal
Instruction
Flag condition
!Z & !(N ^ V)
!(N ^ V)
N ^ V
Z | (N ^ V)
!Z & !C
!C
C
Z | C
Z
!Z
Comparison of A:B
A > B
A
≥
B
A < B
A
≤
B
A > B
A
≥
B
A < B
A
≤
B
A = B
A
≠
B
Remark
Used to compare
signed data
Used to compare
unsigned data
Comparison of A:B made when “
cmp A,B
”