Age | Commit message (Collapse) | Author | Files | Lines |
|
Resolves #1507
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
|
|
Signed-off-by: viktoryou <143797577+viktoryou@users.noreply.github.com>
|
|
Implement the Zvksh sub-extension, "ShangMi Suite: SM3 Hash
Function Instructions":
- vsm3me.vv, message expansion,
- vsm3c.vi, compression rounds.
This also introduces a SM3 specific header for common logic.
Co-authored-by: Raghav Gupta <rgupta@rivosinc.com>
Co-authored-by: Albert Jakieła <aja@semihalf.com>
Co-authored-by: Kornel Dulęba <mindal@semihalf.com>
Signed-off-by: Eric Gouriou <ego@rivosinc.com>
|
|
Implement the Zvksed sub-extension, "ShangMi Suite: SM4 Block Cipher":
- vsm4k.vi, vector SM4 key expansion,
- vsm4r.{vs,vv}, vector SM4 rounds.
This also introduces a header for common vector SM4 logic.
Co-authored-by: Raghav Gupta <rgupta@rivosinc.com>
Co-authored-by: Albert Jakieła <aja@semihalf.com>
Signed-off-by: Eric Gouriou <ego@rivosinc.com>
|
|
Implement the Zvkned extension, "NIST Suite: Vector AES Encryption
& Decryption (Single Round)".
- vaeskf1.vi: AES forward key scheduling, AES-128.
- vaeskf2.vi: AES forward key scheduling, AES-256.
- vaesz.vs: AES encryption/decryption, 0-th round.
- vaesdm.{vs,vv}: AES decryption, middle rounds.
- vaesdf.{vs,vv}: AES decryption, final round.
- vaesem.{vs,vv}: AES encryption, middle rounds.
- vaesef.{vs,vv}: AES encryption, final round.
An extension specific header containing common logic is added.
Co-authored-by: Stanislaw Kardach <kda@semihalf.com>
Signed-off-by: Eric Gouriou <ego@rivosinc.com>
|
|
Implement the instructions part of the Zvknha and Zvknhb
sub-extensions:
- vsha2ms.vv, message schedule
- vsha2ch.vv / vsha2cl.vv, compression rounds
A header files for common macros is added.
Signed-off-by: Eric Gouriou <ego@rivosinc.com>
|
|
Implement the proposed instruction in Zvkg, vghmac.vv,
Vector Carryless Multiply Accumulate over GHASH Galois-Field.
The instruction performs one step of GHASH routine as described
in "NIST Special Publication 800-38D" a.k.a the AES-GCM specification.
The logic was written to closely track the pseudo-code
in the Zvk specification.
Signed-off-by: Eric Gouriou <ego@rivosinc.com>
Co-authored-by: Kornel Duleba <mindal@semihalf.com>
Signed-off-by: Eric Gouriou <ego@rivosinc.com>
|
|
Implement the Zvbc instructions
- vclmul.{vv,vx}, vector carryless multiply low
- vclmulh.{vv,vx}, vector carryless multiply high
Signed-off-by: Eric Gouriou <ego@rivosinc.com>
|
|
Implement the proposed instructions in Zvbb:
- vandn.{vv,vx}, vector bitwise and-not
- vbrev.v, vector bit reverse in element
- vbrev8.v, vector bit reverse in bytes
- vrev8.v, vector byte reverse
- vctz.v, vector count trailing zeros
- vclz.v, vector count leading zeros
- vcpop.v, vector population count
- vrol.{vv,vx}, vector rotate left
- vror.{vi,vv,vx}, vector rotate right
- vwsll.{vi,vv,vx} vector widening shift left logical
A new instruction field, 'zimm6', is introduced, encoded
in bits [15, 19] and [26].. It is used by "vror.vi" to encode
a shift immediate in [0, 63].
Co-authored-by: Raghav Gupta <rgupta@rivosinc.com>
Co-authored-by: Stanislaw Kardach <kda@semihalf.com>
Signed-off-by: Eric Gouriou <ego@rivosinc.com>
|
|
|
|
|
|
|
|
Add support for BF16 extensions
|
|
This change was made ages ago in the spec.
I did not actually test that the new privilege checks in ebreak and
c.ebreak are correct, but all the existing debug tests still pass.
|
|
|
|
|
|
|
|
|
|
This cleans up the code and avoids bugs like #1365.
|
|
|
|
Resolves #1365
|
|
Zfa: fix exception behaviour for fcvtmod.w.d
|
|
Zfa: fix missing set_fp_exceptions for fleq/fltq
|
|
|
|
|
|
Ref #1327
Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
|
|
Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
|
|
Zfa: fix NX handling for the fround/froundnx family
|
|
The initial implementation (together with the SAIL code and the tests)
had gotten the NX variants backwards (as in 'an inexact result is ok'
vs. 'set NX is inexact'). Update all 4 instructions.
Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
|
|
|
|
|
|
This passes our developer test suite, when comparing output
(signature) against the SAIL implementation.
If any corner-cases require additional changes after ACT goes
upstream, we can apply an add-on patch.
|
|
We don't model any sources of RNMI, so this is mostly vestigial.
|
|
r1s/r2s > 16 when r1sc/r1sc >2. This will also trigger illegal
instruction exception by CHECK_REG if RVE is enabled
|
|
|
|
|
|
This implements the Zicond (conditional integer operations) extension,
as of version 1.0-draft-20230120.
The Zicond extension acts as a building block for branchless sequences
including conditional-arithmetic, conditional-logic and
conditional-select/move.
The following instructions constitute Zicond:
- czero.eqz rd, rs1, rs2 => rd = (rs2 == 0) ? 0 : rs1
- czero.nez rd, rs1, rs2 => rd = (rs2 != 0) ? 0 : rs1
See
https://github.com/riscv/riscv-zicond/releases/download/v1.0-draft-20230120/riscv-zicond_1.0-draft-20230120.pdf
for the proposed specification and usage details.
|
|
SFENCE.W.INVAL and SFENCE.INVAL.IR should check privilege mode
|
|
See discussion on https://lists.riscv.org/g/tech-privileged/message/1213
|
|
For Spike, this instruction merely performs exception checks, just like
SFENCE.INVAL.IR. So, implement it in terms of SFENCE.INVAL.IR.
|
|
Fix support for Zc*
|
|
|
|
is less than M-mode (#1149)
|
|
add suport for jvt: Table entries follow the current data endianness
|
|
|