aboutsummaryrefslogtreecommitdiff
path: root/riscv/riscv.mk.in
diff options
context:
space:
mode:
authorBen Marshall <ben-marshall@users.noreply.github.com>2021-01-22 22:11:00 +0000
committerGitHub <noreply@github.com>2021-01-22 14:11:00 -0800
commitd6238d9945d029be956ae7c3e10b532b542e6f36 (patch)
tree43221f50f74032add50498ac1d9c5da509f17c43 /riscv/riscv.mk.in
parentccdbfacc9f3eb84e2f2f6c6e3a8e9ee6160c8a15 (diff)
downloadriscv-isa-sim-d6238d9945d029be956ae7c3e10b532b542e6f36.zip
riscv-isa-sim-d6238d9945d029be956ae7c3e10b532b542e6f36.tar.gz
riscv-isa-sim-d6238d9945d029be956ae7c3e10b532b542e6f36.tar.bz2
scalar-crypto: Initial spike support for v0.8.1 (#635)
Brief: - This commit adds spike support for the scalar cryptography extension. See the riscv-crypto repository (https://github.com/riscv/riscv-crypto) for more information on this extension. - It is based on the experimental patch which has so far been kept in the riscv-crypto repository. Now that scalar crypto is nearly at the "freeze" stage and entering opcode consistency review, it makes sense to start upstreaming our experimental version. - In terms of compiler support - we are using an experimental patch in the riscv-crypto repository at the moment, others are working on an upstream appropriate version. Details: - Add support for dedicated scalar crypto instructions. - Add very basic support for the entropy source (entropy_source.h). Much of the behaviour of this is implementation specific. This model aims to provide the bare minimum of functionality which can be used to quickly develop software. It uses /dev/urandom as its entropy source for now. - Scalar crypto is unique in that it _borrows_ instructions from the Bitmanipulation extension. This is currently _not_ encoded in the patch, as I didn't want to damage anything in Bitmanip which is currently under review. However, I've added a macro in riscv/decode.h called "require_either_extension(A,B)", which allows instructions to be valid opcodes iff they are in one or both extensions. On branch scalar-crypto Changes to be committed: modified: README.md modified: riscv/decode.h modified: riscv/encoding.h new file: riscv/entropy_source.h new file: riscv/insns/aes64im.h new file: riscv/insns/aes64ks1i.h new file: riscv/insns/aes64ks2.h new file: riscv/insns/aes_common.h new file: riscv/insns/aesds.h new file: riscv/insns/aesdsm.h new file: riscv/insns/aeses.h new file: riscv/insns/aesesm.h new file: riscv/insns/sha256sig0.h new file: riscv/insns/sha256sig1.h new file: riscv/insns/sha256sum0.h new file: riscv/insns/sha256sum1.h new file: riscv/insns/sha512sig0.h new file: riscv/insns/sha512sig0h.h new file: riscv/insns/sha512sig0l.h new file: riscv/insns/sha512sig1.h new file: riscv/insns/sha512sig1h.h new file: riscv/insns/sha512sig1l.h new file: riscv/insns/sha512sum0.h new file: riscv/insns/sha512sum0r.h new file: riscv/insns/sha512sum1.h new file: riscv/insns/sha512sum1r.h new file: riscv/insns/sm3p0.h new file: riscv/insns/sm3p1.h new file: riscv/insns/sm4_common.h new file: riscv/insns/sm4ed.h new file: riscv/insns/sm4ks.h modified: riscv/processor.cc modified: riscv/processor.h modified: riscv/riscv.mk.in
Diffstat (limited to 'riscv/riscv.mk.in')
-rw-r--r--riscv/riscv.mk.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/riscv/riscv.mk.in b/riscv/riscv.mk.in
index f02f9ba..aa0c301 100644
--- a/riscv/riscv.mk.in
+++ b/riscv/riscv.mk.in
@@ -431,6 +431,34 @@ riscv_insn_ext_b = \
xperm_h \
xperm_w \
+# Scalar Crypto ISE
+riscv_insn_ext_k = \
+ aesds \
+ aesdsm \
+ aeses \
+ aesesm \
+ aes64ks1i \
+ aes64ks2 \
+ aes64im \
+ sha256sig0 \
+ sha256sig1 \
+ sha256sum0 \
+ sha256sum1 \
+ sha512sig0 \
+ sha512sig0h \
+ sha512sig0l \
+ sha512sig1 \
+ sha512sig1h \
+ sha512sig1l \
+ sha512sum0 \
+ sha512sum0r \
+ sha512sum1 \
+ sha512sum1r \
+ sm3p0 \
+ sm3p1 \
+ sm4ed \
+ sm4ks
+
riscv_insn_ext_v_alu_int = \
vaadd_vv \
vaaddu_vv \
@@ -897,6 +925,7 @@ riscv_insn_list = \
$(riscv_insn_ext_zfh) \
$(riscv_insn_ext_q) \
$(riscv_insn_ext_b) \
+ $(riscv_insn_ext_k) \
$(if $(HAVE_INT128),$(riscv_insn_ext_v),) \
$(riscv_insn_ext_h) \
$(riscv_insn_priv) \