5 INSTRUCTION SET
S1C17 FAMILY S1C17 CORE MANUAL
EPSON
5-19
For jpr %rb
jpr
%rb
A signed 24-bit relative value is specified for rb.
The jump address is configured as follows:
{rb(23:1), 0}
23
S
D(23:1)
0
1
%rb
0
X
0
Current address
PC
Branch destination address
PC
+
2
+
The least significant bit in the rb register is always handled as 0.
The range of addresses to which jumped is (PC - 8,388,606) to (PC + 8,388,608).
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 jpr instruction is an unconditional jump instruction 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 instruc-
tion to determine whether to branch. For this reason, the name of each instruction includes a character that rep-
resents relative magnitude.
The types of conditional jump instructions and branch conditions are listed in Table 5.8.1.1.
Table 5.8.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”
(2) Absolute jump instructions
The absolute jump instruction jpa causes the program to unconditionally branch to the location indicated by
the content of a specified general-purpose register (rb) or an immediate imm7 (can be extended to imm20 or
imm24
using the ext instruction) as the absolute address. When the content of the rb register or the immediate
is loaded into the PC, its least significant bit is always made 0.
23
D(23:1)
0
1
rb
X
0
Branch destination address
PC
jpa %rb