// vmerge.vim vd, vs2, simm5 require(insn.rd() != 0); VI_CHECK_SSS(false); VI_VVXI_MERGE_LOOP ({ int midx = (P.VU.vmlen * i) / 64; int mpos = (P.VU.vmlen * i) % 64; bool use_first = (P.VU.elt(0, midx) >> mpos) & 0x1; vd = use_first ? simm5 : vs2; })