PADDUSB
/ VPADDUSBAdd unsigned bytes with saturation
Add corresponding unsigned bytes and clamp each result to 255.
Similar operations on Arm64:UQADDvqaddq_u8
| Form | Bits | Requires | Encoding |
|---|---|---|---|
PADDUSB xmm1, xmm2 | 128 | SSE2 | 66 0F DC /r |
VPADDUSB xmm1, xmm2, xmm3 | 128 | AVX | VEX.L0.66.0F.WIG DC /r |
VPADDUSB ymm1, ymm2, ymm3 | 256 | AVX2 | VEX.L1.66.0F.WIG DC /r |
Explore the operation
The interactive explorer is loading. The operation and reference details are available below.
Operation#
Pseudo-C · selected form
dst[i] = min(a[i] + b[i], 255)Exact upstream semantics
Standard variant
let elements := register_size / element_size;
var result := Zero(register_size);
for i := 0 to elements-1 do
let op1 := src1[i *: element_size];
let op2 := src2[i *: element_size];
let e := Unsigned(op1) + Unsigned(op2);
let r := Unsigned_Saturate(e, element_size);
result[i *: element_size] := r;
endfor;What to watch for
- Inputs are unsigned bytes.
- Saturation does not set an x86 arithmetic status flag.
Corresponding intrinsics#
Architectural details#
- Flags
- Arithmetic flags unchanged.
- Destination
- Writes the low 128 bits; upper vector-register bits are preserved.
- Encoding
66 0F DC /r- Operands
xmm1read / writexmm2read
- Coverage
- Selected register-only 128/256-bit forms. Memory operands, MMX, and EVEX/AVX-512 forms are outside this sample.
Exception information & execution requirements
#NM#UD
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 · PADDUSB-PADDUSW-Add-Packed-Unsigned-Integers-With-Unsigned-Saturation.xml
- Revision
4ebe7f0ac1bd00f46244c49bb72c503ce368def7- SHA-256
0aed1b9ca6a8ab6293bac1890395b7bbd7b4e0cd2e883b20e37c2f48c6a72679- Terms
- Intel SDM terms; see License.md
Intel · intrinsics.xml
- Revision
4ebe7f0ac1bd00f46244c49bb72c503ce368def7- SHA-256
6762a50652a35ef663fd532ed83b789d19bbc2ac7e94b1771f19d666d96c2c30- Terms
- Intel SDM terms; see License.md