vsm4k.vi
Vector SM4 KeyExpansion
Encoding
| 3126 | 25 | 2420 | 1915 | 1412 | 117 | 60 | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 100001 | 1 | vs2 | zimm5 | 010 | vd | 1110111 | |||||||||||||||||||||||||
Match 0x86002077, mask 0xfe00707f. Source: vsm4k.vi 31..26=0x21 25=1 vs2 zimm5 14..12=0x2 vd 6..0=0x77 in riscv-opcodes/extensions/rv_zvksed.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| vs2 | 24:20 | vs2 |
| zimm5 | 19:15 | zimm5 |
| vd | 11:7 | vd |
Description
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.
Description from riscv-unified-db, reformatted.