
74
Chapter 3 Functions
3.2 Functions
EXTend Sign
Extend sign
[ Description Example ]
[ Function ]
[ Flag Change ]
EXTS EXTS
[ Syntax ]
EXTS.size dest
• This instruction sign extends
dest
and stores the result in
dest
.
• If you selected (.B) for the size specifier (.size),
dest
is sign extended to 16 bits.
• If you selected (.W) for the size specifier (.size), R0 is sign extended to 32 bits. In this case, R2 is used
for the upper bytes.
dest
R0L/R0 R0H/R1 R1L/R2 R1H/R3
A0/A0 A1/A1 [A0] [A1]
dsp:8[A0] dsp:8[A1] dsp:8[SB] dsp:8[FB]
dsp:16[A0] dsp:16[A1] dsp:16[SB] abs16
dsp:20[A0] dsp:20[A1] abs20
R2R0 R3R1 A1A0
EXTS.B R0L
EXTS.W R0
B , W
[ Operation ]
dest EXT(dest)
UIOBSZDC
Conditions
S : If you selected (.B) for the size specifier (.size), the flag is set when the operation resulted in MSB
= 1; otherwise cleared. The flag does not change if you selected (.W) for the size specifier (.size).
Z : If you selected (.B) for the size specifier (.size), the flag is set when the operation resulted in 0;
otherwise cleared. The flag does not change if you selected (.W) for the size specifier (.size).
[ Selectable dest ]
[ Instruction Code/Number of Cycles ]
Page=
180
Flag
Change
Comentarios a estos manuales