OSDN Git Service

target/riscv: Add Zvksed ISA extension support
authorMax Chou <max.chou@sifive.com>
Tue, 11 Jul 2023 16:59:14 +0000 (00:59 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Mon, 11 Sep 2023 01:45:55 +0000 (11:45 +1000)
commit8b045ff45420d12bdbd9868e83559ffaaf059144
tree9f164209bada8fdd12d6a6129deb0821c79727f5
parentf5f3a9152ae1242f5d1113852aa97d13b382815b
target/riscv: Add Zvksed ISA extension support

This commit adds support for the Zvksed vector-crypto extension, which
consists of the following instructions:

* vsm4k.vi
* vsm4r.[vv,vs]

Translation functions are defined in
`target/riscv/insn_trans/trans_rvvk.c.inc` and helpers are defined in
`target/riscv/vcrypto_helper.c`.

Signed-off-by: Max Chou <max.chou@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
[lawrence.hunter@codethink.co.uk: Moved SM4 functions from
crypto_helper.c to vcrypto_helper.c]
[nazar.kazakov@codethink.co.uk: Added alignment checks, refactored code to
use macros, and minor style changes]
Signed-off-by: Max Chou <max.chou@sifive.com>
Message-ID: <20230711165917.2629866-16-max.chou@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu.c
target/riscv/cpu_cfg.h
target/riscv/helper.h
target/riscv/insn32.decode
target/riscv/insn_trans/trans_rvvk.c.inc
target/riscv/vcrypto_helper.c