6.6 Extended Instructions
The as assembler supports the extended instructions explained below. Extended instructions allow an operation that normally
requires using multiple instructions including the ext instruction to be written in one instruction. They are expanded into the
absolutely necessary minimum basic instructions according to instruction functionality and the operand's immediate size before
assembling.
Symbols used in explanation
immX
Unsigned X-bit immediate
signX
Signed X-bit immediate
Symbol to indicate memory address
symbol
Jump address label
label
(X:Y)
Bit field from bit X to bit Y
6.6.1
Arithmetic Operation Instructions
Types and functions of extended instructions
Extended instruction
sadd
%rd,imm16
sadc
%rd,imm16
sadd.a
%rd,imm20
sadd.a
%sp,imm20
ssub
%rd,imm16
ssbc
%rd,imm16
ssub.a
%rd,imm20
ssub.a
%sp,imm20
xadd
%rd,imm16
xadc
%rd,imm16
xadd.a
%rd,imm24
xadd.a
%sp,imm24
xsub
%rd,imm16
xsbc
%rd,imm16
xsub.a
%rd,imm24
xsub.a
%sp,imm24
These extended instructions allow a 16-bit/20-bit/24-bit immediate to be specified directly in an add or subtract operation.
A conditional operation option (/c, /nc) cannot be specified in the extended instructions.
Basic instructions after expansion
sadd, xadd
sadc, xadc
sadd.a, xadd.a
ssub, xsub
ssbc, xsbc
ssub.a, xsub.a
S5U1C17001C Manual
(Rev. 1.0)
%rd ← %rd+imm16
%rd ← %rd+imm16+C
%rd ← %rd+imm20
%sp ← %sp+imm20
%rd ← %rd-imm16
%rd ← %rd-imm16-C
%rd ← %rd-imm20
%sp ← %sp-imm20
%rd ← %rd+imm16
%rd ← %rd+imm16+C
%rd ← %rd+imm24
%sp ← %sp+imm24
%rd ← %rd-imm16
%rd ← %rd-imm16-C
%rd ← %rd-imm24
%sp ← %sp-imm24
Expanded into the add instruction
Expanded into the adc instruction
Expanded into the add.a instruction
Expanded into the sub instruction
Expanded into the sbc instruction
Expanded into the sub.a instruction
Seiko Epson Corporation
Function
6 Assembler
Expansion
(1)
(1)
(2)
(2)
(1)
(1)
(2)
(2)
(1)
(1)
(3)
(3)
(1)
(1)
(3)
(3)
6-13
Need help?
Do you have a question about the S5U1C17001C and is the answer not in the manual?