cpopw

Operands

reg, reg

Count set bits (32 bit) : Set t1 to the number of 1 bits in the low 32 bits of t2 (64bit)

Variants

  • Count set bits (32 bit) : Set t1 to the number of 1 bits in the low 32 bits of t2 (64bit) cpopw t1,t2

This example runs on RV64.

.text
li t0, 13
# t0=13; cpopw writes 3 to t2.
cpopw t2, t0