aboutsummaryrefslogtreecommitdiff
path: root/unratified/rv_zpn
diff options
context:
space:
mode:
authorEric Gouriou <ego@rivosinc.com>2023-05-01 21:57:16 -0700
committerEric Gouriou <ego@rivosinc.com>2023-05-01 21:57:16 -0700
commit199e646f2a8e36533c92280a5fba0d259ba7fbfb (patch)
treecb37a856a49ecb27592a0e6e2d8f23155627436e /unratified/rv_zpn
parentbb64568616b364e7103910f5dd363bc9cad1bb0a (diff)
downloadriscv-opcodes-199e646f2a8e36533c92280a5fba0d259ba7fbfb.zip
riscv-opcodes-199e646f2a8e36533c92280a5fba0d259ba7fbfb.tar.gz
riscv-opcodes-199e646f2a8e36533c92280a5fba0d259ba7fbfb.tar.bz2
Support for Zvk, Vector Cryptography Extensions
Add encodings for all instructions in the Zvk extensions: - Zvbb, Vector Bit-manipulation instructions used in Cryptography, - Zvbc, Vector Carryless Multiplication - Zvkg, Vector GCM/GMAC instruction for Cryptography, - Zvkned, NIST Suite: Vector AES Encryption & Decryption (Single Round), - Zvknha, Zvknhb, NIST Suite: Vector SHA-2, - Zvksed, ShangMi Suite: SM4 Block Cipher Instructions - Zvkssh, ShangMi Suite: SM3 Hash Function Instructions Add two "shorthand" extensions: - Zvkn: NIST Suite, imports Zvbb, Zvbc, Zvkned, and Zvknh - Zvks: ShangMi Suite, imports Zvbb, Zvbc, Zvksed, and Zvksh Three new fields are listed in constants.py: - 'zimm5', used to encode round constants (Zvkns, Zvksed, Zvksh), and 5-bit shift constant (vwsll.vi in Zvbb) - 'zimm6hi, zimm6lo', used to encode the 6 bits rotate amount in vror.vi. The Zvk instructions – with the exception of Zvbb, Zvbc – reside in the P opcode space. Some encodings conflict with proposed instructions in the P extension (packed SIMD). Zvk and P are exclusive of each other, no implementation will implement both. Conflicting P instructions are marked as pseudo of the Zvk instructions. The encodings match the current documentation of the specification at <https://github.com/riscv/riscv-crypto/tree/master/doc/vector>, at Version v0.9.1, 25 April, 2023 (Freeze Candidate). Co-authored-by: Eric Gouriou <ego@rivosinc.com> Co-authored-by: Stanislaw Kardach <kda@semihalf.com> Co-authored-by: Kornel Duleba <mindal@semihalf.com> Co-authored-by: Raghav Gupta <rgupta@rivosinc.com> Signed-off-by: Eric Gouriou <ego@rivosinc.com>
Diffstat (limited to 'unratified/rv_zpn')
-rw-r--r--unratified/rv_zpn2
1 files changed, 1 insertions, 1 deletions
diff --git a/unratified/rv_zpn b/unratified/rv_zpn
index af26492..29ab4fd 100644
--- a/unratified/rv_zpn
+++ b/unratified/rv_zpn
@@ -96,7 +96,7 @@ raddw 31..25=0b0010000 rs2 rs1 14..12=0b001
rcras16 31..25=0b0000010 rs2 rs1 14..12=0b000 rd 6..0=0b1110111
rcrsa16 31..25=0b0000011 rs2 rs1 14..12=0b000 rd 6..0=0b1110111
rstas16 31..25=0b1011010 rs2 rs1 14..12=0b010 rd 6..0=0b1110111
-rstsa16 31..25=0b1011011 rs2 rs1 14..12=0b010 rd 6..0=0b1110111
+$pseudo_op rv_zvknha::vsha2ms.vv rstsa16 31..25=0b1011011 rs2 rs1 14..12=0b010 rd 6..0=0b1110111
rsub16 31..25=0b0000001 rs2 rs1 14..12=0b000 rd 6..0=0b1110111
rsub8 31..25=0b0000101 rs2 rs1 14..12=0b000 rd 6..0=0b1110111
rsubw 31..25=0b0010001 rs2 rs1 14..12=0b001 rd 6..0=0b1110111