Webcentive RISC-V Reference

vsm3c.vi

Vector SM3 compression

Extension
Zvks, Zvksh
XLEN
RV32 and RV64
Assembly (riscv-unified-db)
vsm3c.vi vd, vs2, imm
Length
32-bit

Encoding

31262524201915141211760
1010111vs2zimm5010vd1110111

Match 0xae002077, mask 0xfe00707f. Source: vsm3c.vi 31..26=0x2B 25=1 vs2 zimm5 14..12=0x2 vd 6..0=0x77 in riscv-opcodes/extensions/rv_zvksh.

FieldBitsriscv-opcodes name
vs224:20vs2
zimm519:15zimm5
vd11:7vd

Description

Performs two rounds of SM3 compression. The current state of eight 32-bit words is read as an element group from vd, and eight 32-bit message words are read as an element group from vs2, of which only four are used. The next state of eight 32-bit words is written to vd. The 5-bit imm gives the round group, 0-31, that selects which two rounds are performed; for example, imm=1 performs rounds 2 and 3.

Description from riscv-unified-db, reformatted.

Specification and related pages