vsadd.vi
Vector Single-Width Saturating Add Signed with Immediate
- Extension
- V
- XLEN
- RV32 and RV64
- Assembly (riscv-unified-db)
vsadd.vi vd, vs2, imm, vm- Length
- 32-bit
Encoding
| 3126 | 25 | 2420 | 1915 | 1412 | 117 | 60 | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 100001 | vm | vs2 | simm5 | 011 | vd | 1010111 | |||||||||||||||||||||||||
Match 0x84003057, mask 0xfc00707f. Source: vsadd.vi 31..26=0x21 vm vs2 simm5 14..12=0x3 vd 6..0=0x57 in riscv-opcodes/extensions/rv_v.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| vm | 25 | vm |
| vs2 | 24:20 | vs2 |
| simm5 | 19:15 | simm5 |
| vd | 11:7 | vd |
Description
Performs saturating signed addition on elements from vector register vs2 and immediate value imm and stores results in vector register vd, using vector mask vm. If the result would overflow the destination, the result is replaced with the closest representable value, and the vxsat bit is set.
Description from riscv-unified-db, reformatted.