vsha2ch.vv
Vector SHA-2 two rounds of compression, high part
- Extension
- Zvkn, Zvknha, Zvknhb
- XLEN
- RV32 and RV64
- Assembly (riscv-unified-db)
vsha2ch.vv vd, vs2, vs1- Length
- 32-bit
Encoding
| 3126 | 25 | 2420 | 1915 | 1412 | 117 | 60 | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 101110 | 1 | vs2 | vs1 | 010 | vd | 1110111 | |||||||||||||||||||||||||
Match 0xba002077, mask 0xfe00707f. Source: vsha2ch.vv 31..26=0x2E 25=1 vs2 vs1 14..12=0x2 vd 6..0=0x77 in riscv-opcodes/extensions/rv_zvknha.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| vs2 | 24:20 | vs2 |
| vs1 | 19:15 | vs1 |
| vd | 11:7 | vd |
Description
Performs two rounds of SHA-2 compression (SHA-256 when SEW=32; SHA-512 when SEW=64, which requires Zvknhb). Two message schedule words from vs1 are processed with the eight words of current state held in vd and vs2 to produce four words of the next state, which are written to vd. vsha2ch.vv uses the two most significant message schedule words of the element group in vs1; vsha2cl.vv is identical except that it uses the two least significant.
Description from riscv-unified-db, reformatted.
Specification and related pages
- The RISC-V Instruction Set Manual: src/unpriv/zvk.adoc (Zvkn)
- The RISC-V Instruction Set Manual: src/unpriv/zvk.adoc (Zvknha)
- The RISC-V Instruction Set Manual: src/unpriv/zvk.adoc (Zvknhb)
- riscv-unified-db: spec/std/isa/inst/Zvknha/vsha2ch.vv.yaml
- Zvkn instruction listing
- Zvknha instruction listing
- Zvknhb instruction listing