
7 DETAILS OF INSTRUCTIONS
7-30
EPSON
S1C17 FAMILY S1C17 CORE MANUAL
ext imm13
Function
Immediate extension
Standard)
Extends the immediate data/operand of the following instruction
Extension 1) Unusable
Extension 2) Unusable
Code
15 14 13 12 11 10
9
8
7
6
5
4
3
2
1
0
0 1 0
imm13
|
Flag
IL IE
C
V
Z
N
– – – – – –
|
Mode
Immediate data (unsigned)
CLK
One cycle
Description Extends the immediate data or operand of the following instruction.
When extending an immediate data, the immediate data in the ext instruction will be placed on the
high-order side and the immediate data in the target instruction to be extended is placed on the low-
order side.
Up to two ext imm3 instructions can be used sequentially. In this case, the immediate data in the
first ext instruction is placed on the most upper part. When three or more ext instructions have
been described sequentially, the last two are effective and others are ignored.
See descriptions of each instruction for the extension contents and the usage.
Interrupts for the ext instruction (not including reset and debug break) are masked in the hardware,
and interrupt handling is determined when the target instruction to be extended is executed. In this
case, the return address from interrupt handling is the beginning of the ext instruction.
Example
ext
0x7ff
ext
0x1fff
add.a
%r1,%r2
; r1 = r2 + 0xffffff
Caution
When a load instruction that transfers data between memory and a register follows the ext
instruction, an address misaligned interrupt may occur before executing the load instruction (if the
address that is specified with the immediate data in the ext instruction as the displacement is not a
boundary address according to the transfer data size). When an address misaligned interrupt occurs,
the trap handling saves the address of the load instruction into the stack as the return address. If
the trap handler routine is returned by simply executing the reti instruction, the previous ext
instruction is invalidated. Therefore, it is necessary to modify the return address in that case.