How is VRSUB.VI different from VSUB?
VRSUB is reverse subtraction: scalar or immediate minus vs2. VSUB computes vs2 minus the other operand.
Subtract vector elements from a sign-extended immediate.
VRSUB.VI computes signext(imm) - vs2[i] for active elements and writes the low SEW bits to vd.
VRSUB.VI reverses the operand direction of VSUB and computes scalar/immediate minus each element.
Understand this scenario with real code like «vrsub.vi v8, v12, 7, v0.t».
Understand this scenario with real code like «vrsub.vi v8, v12, 7, v0.t».
VRSUB is reverse subtraction: scalar or immediate minus vs2. VSUB computes vs2 minus the other operand.