Home/Instructions/VWADDU-WX
VWADDU.WX

RISC-V VWADDU.WX Instruction Details

Instruction ManualR-type

Unsigned widening add with 2*SEW results.

Instruction Syntax

vwaddu.wx vd, vs2, rs1, vm
Operand Breakdown
Destination rd: register receiving the operation result.
Source rs1: register holding the first operand.
Source rs2: register holding the second operand.
VVector Operations

Instruction Behavior

VWADDU.WX extends inputs and adds them to produce 2*SEW-wide results. The W form adds a 2*SEW-wide vs2 source to an SEW-wide second operand.

Quick Understanding & Search Notes

VWADDU.WX keeps add results in a wider destination, avoiding SEW-width wraparound from single-width add.

Destination elements are 2*SEW wide.
In W forms, vs2 is already wide and the second operand is extended from single width before addition.
Unsigned forms use zero extension.

Common Usage Scenarios

Bit Operations & Masks

Understand this scenario with real code like «vwaddu.wx v8, v12, x5, v0.t».

Data Storing

Understand this scenario with real code like «vwaddu.wx v8, v12, x5, v0.t».

Vector Operations

Understand this scenario with real code like «vwaddu.wx v8, v12, x5, v0.t».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is R-type.
  • Confirm the operand order matches the example.
Semantic Check
  • Ensure the destination register usage is compatible with the calling convention.
  • Confirm this is not the lower-level form of a pseudo-instruction expansion.

Pitfalls / Common Confusions

In W forms, vs2 is already a 2*SEW-wide source.
The second operand is zero-extended before addition.
Destination elements remain 2*SEW wide.

FAQ

Is VWADDU.WX an accumulator instruction?

No. It produces widening add results; check VWADD.W* or dedicated multiply-accumulate/reduction instructions for accumulator semantics.