5.6 Addressing Modes with ext
The immediate specifiable in 16-bit, fixed-length instruction code is specified in a bit field of a length ranging
from 4 bits to 8 bits, depending on the instruction used. The ext instructions are used to extend the size of this
immediate.
The ext instructions are used in combination with data transfer or arithmetic/logic instructions, and is placed
directly before the instruction whose immediate needs to be extended. The instruction is expressed in the form
ext imm13, in which the immediate size extendable by one ext instruction is 13 bits and up to two ext
instructions can be written in succession to extend the immediate further.
The ext instructions are effective only for the instructions for which the immediate extension written directly
after ext is possible, and have no effect for all other instructions. When three or more ext instructions have been
described sequentially, an undefined instruction exception (ext exception) occurs before executing the extension
target instruction.
When an instruction, which does not support the extension in the ext instruction, follows an ext, the ext
instruction will be executed as a nop instruction.
5.6.1 Extension of Immediate Addressing
Extension of imm6
The imm6 immediate is extended to a 19-bit or 32-bit immediate.
Extending to a 19-bit immediate
To extend the immediate to 19-bit quantity, enter one ext instruction directly before the target instruction.
Example: ext
imm13
add
%rd,imm6
Extended immediate
31
0
0
0
0
Bits 31–19 are filled with 0 (zero-extension).
Extending to a 32-bit immediate
To extend the immediate to 32-bit quantity, enter two ext instructions directly before the target instruction.
Example: ext
imm13 (1)
imm13 (2)
ext
sub
%rd,imm6
Extended immediate
31
Extension of sign6
The sign6 immediate is extended to a sign-extended 19-bit or 32-bit immediate.
Extending to a 19-bit immediate
To extend the immediate to 19-bit quantity, enter one ext instruction directly before the target instruction.
Example: ext
imm13
ld.w
%rd,sign6
Extended immediate
31
S
S
S
S
The most significant bit "S" in imm13 that has been extended by the ext instruction is the sign,
with which bits 31–19 are extended to become signed 19-bit data. The most significant bit in sign6 is
handled as the MSB data of 6-bit data, and not as the sign.
S1C33 FAMILY C33 PE CORE MANUAL
19 18
0
0
0
0 0 0 0 0 0
19 18
imm13 (1)
19 18
S
S
S
S S S S S S
S
imm13
imm13 (2)
imm13
EPSON
5 INSTRUCTION SET
6
5
0
imm6
6
5
0
imm6
6
5
0
sign6
25