PMOVSXBW
/ VPMOVSXBWWiden bytes to words with sign extension
Extend selected low bytes to 16-bit elements.
Similar operations on Arm64:SSHLLvmovl_s8
| Form | Bits | Requires | Encoding |
|---|---|---|---|
PMOVSXBW xmm1, xmm2 | 128 | SSE4.1 | 66 0F 38 20 /r |
VPMOVSXBW xmm1, xmm2 | 128 | AVX | VEX.L0.66.0F38.WIG 20 /r |
VPMOVSXBW ymm, xmm | 256 | AVX2 | VEX.L1.66.0F38.WIG 20 /r |
Operation#
Pseudo-C · selected form
dst[i] = sign_extend(low_source_bytes[i], 16)Exact upstream semantics
Standard variant
let elements := result_size / result_element_size;
var result := Zero(result_size);
for i := 0 to elements-1 do
let op := src[i *: element_size];
let r := Sign_Extend(op, result_element_size);
result[i *: result_element_size] := r;
endfor;What to watch for
- Only the low 64 source bits are read; the destination is 128 bits wide. The source is an XMM register in both vector widths.
Corresponding intrinsics#
__m128i _mm_cvtepi8_epi16(__m128i a)Documented mapping
PMOVSXBW xmm, xmm
Architectural details#
- Flags
- RFLAGS unchanged.
- Destination
- Writes the low 128 bits; upper vector-register bits are preserved.
- Encoding
66 0F 38 20 /r- Operands
xmm1write · 128 bits (8 × 16) · signedxmm2read · 64 bits (8 × 8) · signed
- Coverage
- Selected register-only 128/256-bit legacy and VEX forms. Memory, MMX, EVEX/AVX-512 and scalar floating-point forms are outside this selection.
Exception information & execution requirements
#NM#UD
Feature availability, operating-system vector-state enablement and applicable floating-point exception controls still apply.
Feature availability alone does not guarantee execution: OS state and execution-level controls also apply. Use the linked architecture documentation for the full exception conditions.
Sources & provenance#
Technical fields are imported from pinned upstream files. Explanations and explorer behavior are maintained separately.
Intel · PMOVSX-Packed-Move-With-Sign-Extend.xml
- Revision
4ebe7f0ac1bd00f46244c49bb72c503ce368def7- SHA-256
7610456e1bb613f48904e0666eabcf0f557bd109277586cb440bfe291cf55656- Terms
- Intel SDM terms; see License.md
Intel · intrinsics.xml
- Revision
4ebe7f0ac1bd00f46244c49bb72c503ce368def7- SHA-256
6762a50652a35ef663fd532ed83b789d19bbc2ac7e94b1771f19d666d96c2c30- Terms
- Intel SDM terms; see License.md