vsm4k.vi

Vector SM4 KeyExpansion

Performs four rounds of SM4 key expansion. Four round keys are read as a four-element group from vs2, and the next four round keys are written to vd. The round group number, 0-7, comes from imm[2:0] and selects which group of four round keys is generated; imm[4:3] are ignored. For example, imm=1 generates round keys 4, 5, 6, and 7.

This instruction must have data-independent timing when extension Zkt is enabled.

Assembly format

vsm4k.vi vd, vs2, imm

Decode Variables

Bits<5> vs2 = $encoding[24:20];
Bits<5> imm = $encoding[19:15];
Bits<5> vd = $encoding[11:7];

Execution

Encoding

svg

Defining extension

Access

M

Always

Containing profiles

  • Mandatory: RVA20S64, RVA20U64, RVA22S64, RVA22U64, RVA23S64, RVA23U64, RVA23p1S64, RVB23S64, RVB23U64, RVB23p1S64

  • Optional: None