
15
8
7
6
0
S
15
8
7
6
0
19
16
S
19
16
SXTX[.W] Rdst
SXTX[.W] dst
15
8
7 6
0
19
16
20
31
0
0
......
S
19
16
15
8
7 6
0
19
16
S
19
16
SXTX.A Rdst
SXTX.A dst
Instruction Set Description
4.6.3.35 SXTX
SXTX.A
Extend sign of lower byte to address-word
SXTX.[W]
Extend sign of lower byte to word
SXTX.A dst
Syntax
SXTX dst
or
SXTX.W dst
Operation
dst.7
→
dst.15:8, Rdst.7
→
Rdst.19:8 (Register mode)
Description
Register mode: The sign of the low byte of the operand (Rdst.7) is extended into the bits
Rdst.19:8.
Other modes: SXTX.A: the sign of the low byte of the operand (dst.7) is extended into
dst.19:8. The bits dst.31:20 are cleared.
SXTX[.W]: the sign of the low byte of the operand (dst.7) is extended into dst.15:8.
Status Bits
N:
Set if result is negative, reset otherwise
Z:
Set if result is zero, reset otherwise
C:
Set if result is not zero, reset otherwise (C = .not.Z)
V:
Reset
Mode Bits
OSCOFF, CPUOFF, and GIE are not affected.
Example
The signed 8-bit data in EDE.7:0 is sign extended to 20 bits: EDE.19:8. Bits 31:20
located in EDE+2 are cleared.
SXTX.A
&EDE
; Sign extended EDE -> EDE+2/EDE
Figure 4-59. Sign Extend SXTX.A
Figure 4-60. Sign Extend SXTX[.W]
225
SLAU272C – May 2011 – Revised November 2013
CPUX
Copyright © 2011–2013, Texas Instruments Incorporated