Skip to content

VSUB

Operation

Subtracts corresponding active integer vector elements.

Assembler Syntax

VSUB.{B|W|L|Q}(x) Pn(p), Vn(v), Vn(w)

VSUB.{B|W|L|Q}(x) Pn(p), <ea>(e), Vn(v)

VSUB.{B|W|L|Q}(x) Pn(p), Vn(v), <ea>(e)

Privilege

Unprivileged

Required CPUID flags

VECTOR

VSUB subtracts each corresponding active source element from its destination element. For B, W, L, and Q elements, the selected-width modular difference replaces the destination element. The register form and the memory-source form write the result to the destination vector lane. An inactive destination lane retains its previous value.

The memory-destination form reads each active destination element, subtracts the corresponding source-register element, and writes the result back to that memory element. Inactive memory elements retain their previous values, making the destination transaction a lane-wise read-modify-write.

2.75in

Encodings

VSUB.{B|W|L|Q}(x) Pn(p), Vn(v), Vn(w)

Format: Instruction format for VSUB.{B|W|L|Q}(x) Pn(p), Vn(v), Vn(w)

Format: Instruction format for VSUB.{B|W|L|Q}(x) Pn(p), Vn(v), Vn(w)

sizeallowed: 0x0..0x3 [reserved_vector_element_type]

2.75in VSUB.{B|W|L|Q}(x) Pn(p), <ea>(e), Vn(v)

Format: Instruction format for VSUB.{B|W|L|Q}(x) Pn(p), <ea>(e), Vn(v)

Format: Instruction format for VSUB.{B|W|L|Q}(x) Pn(p), <ea>(e), Vn(v)

sizeallowed: 0x0..0x3 [reserved_vector_element_type]

2.75in VSUB.{B|W|L|Q}(x) Pn(p), Vn(v), <ea>(e)

Format: Instruction format for VSUB.{B|W|L|Q}(x) Pn(p), Vn(v), <ea>(e)

Format: Instruction format for VSUB.{B|W|L|Q}(x) Pn(p), Vn(v), <ea>(e)

sizeallowed: 0x0..0x3 [reserved_vector_element_type]

dstexcluded: immediate [invalid_destination]