VMSOF.M

Vector Mask Set Only First

VMSOF.M vd, vs2, vm

Sets only the first set bit from the source mask.

Encoding

Binary Layout
010100
31:26
vm
25
vs2
24:20
00010010
19:12
vd
11:7
1010111
6:0
 
Format OPMVV
Opcode 0x50012057
Extension V

Operands

  • vd
    Dest Mask
  • vs2
    Src Mask

Example

VMSOF.M v1, v4, v0.t

Related

More in V

Description

Sets only the destination mask bit corresponding to the first active set bit in vs2.

Operation

vd = (1 << first_set_index(vs2)) & vm;