Is v0 an ordinary execution mask here?
Here each v0 mask bit is the carry-in, not an element enable bit.
Vector immediate add with carry-in: vd[i] = vs2[i] + imm + v0[i].LSB; use vmadc to generate carry-out.
vadc.vim is the RISC-V V extension vector immediate add-with-carry instruction. For each element it computes vd[i] = vs2[i] + SEW(imm) + v0[i].LSB, where v0[i].LSB is the carry-in from the corresponding mask bit. The sum is written to the regular vector destination vd; this instruction does not produce a carry-out mask. Use vmadc.vim to compute carry-out. SEW supports 8/16/32/64.
VADC.VIM is an RVV add-with-carry sum instruction for multi-word arithmetic. Carry-in comes from v0.mask[i], the sum is written to normal vector register vd, and carry-out must be generated separately with VMADC.
Understand this scenario with real code like «vadc.vim vd, vs2, 0, v0».
Understand this scenario with real code like «vadc.vim vd, vs2, 0, v0».
Understand this scenario with real code like «vadc.vim vd, vs2, 0, v0».
Here each v0 mask bit is the carry-in, not an element enable bit.
No. VADC writes the sum; VMADC produces the carry mask for the next step.