Where is the result written?
It is written to scalar integer register rd. VCPOP.M writes a count; VFIRST.M writes the first set element index or -1.
Count 1 bits in the active mask elements and write the scalar result to rd
VCPOP.M counts active set bits in mask source vs2 and writes the count to integer register rd. The execution mask can restrict which elements participate.
VCPOP.M is an RVV mask-to-scalar instruction: the result is written to integer register rd, not a vector register.
Understand this scenario with real code like «vcpop.m rd, vs2».
Understand this scenario with real code like «vcpop.m rd, vs2».
It is written to scalar integer register rd. VCPOP.M writes a count; VFIRST.M writes the first set element index or -1.