VCPOP.M
Vector Mask Population Count
VCPOP.M rd, vs2, vm
Counts set bits in the source mask register.
Encoding
Binary Layout
010000
31:26
vm
25
vs2
24:20
10000010
19:12
rd
11:7
1010111
6:0
Operands
-
rd
Dest (Scalar) -
vs2
Src Mask
Example
VCPOP.M t0, v4, v0.t
Related
More in V
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
Counts the number of set bits in mask register vs2 that are active (within vl), writing the count to scalar rd.
Operation
rd = count_set_bits(vs2 & vm);