VWADD.VX

RISC-V VWADD.VX Instruction Details

Instruction ManualR-type

Signed widening add with 2*SEW results.

Instruction Syntax

vwadd.vx 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

VWADD.VX extends inputs and adds them to produce 2*SEW-wide results. The regular form widens two SEW-wide operands before adding.

Quick Understanding & Search Notes

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

Destination elements are 2*SEW wide.
Regular forms extend both single-width sources to 2*SEW before adding.
Signed forms use sign extension.

Common Usage Scenarios

Bit Operations & Masks

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

Data Storing

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

Vector Operations

Understand this scenario with real code like «vwadd.vx 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

Destination elements are 2*SEW wide, so the destination register group EMUL widens too.
Signed forms sign-extend inputs.
This is widening addition, not saturating addition; it does not set vxsat.

FAQ

Is VWADD.VX an accumulator instruction?

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