qemu/target
Ard Biesheuvel 9ea17007c4 target/riscv: Use existing lookup tables for MixColumns
The AES MixColumns and InvMixColumns operations are relatively
expensive 4x4 matrix multiplications in GF(2^8), which is why C
implementations usually rely on precomputed lookup tables rather than
performing the calculations on demand.

Given that we already carry those tables in QEMU, we can just grab the
right value in the implementation of the RISC-V AES32 instructions. Note
that the tables in question are permuted according to the respective
Sbox, so we can omit the Sbox lookup as well in this case.

Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: Zewen Ye <lustrew@foxmail.com>
Cc: Weiwei Li <liweiwei@iscas.ac.cn>
Cc: Junqiang Wang <wangjunqiang@iscas.ac.cn>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20230731084043.1791984-1-ardb@kernel.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2023-09-11 11:45:54 +10:00
..
alpha target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
arm trivial: Simplify the spots that use TARGET_BIG_ENDIAN as a numeric value 2023-09-08 13:08:52 +03:00
avr target/translate: Include missing 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
cris target/helpers: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
hexagon hexagon: spelling fixes 2023-09-08 13:08:52 +03:00
hppa target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
i386 * only build util/async-teardown.c when system build is requested 2023-09-07 10:29:06 -04:00
loongarch target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
m68k target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
microblaze target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
mips hw/mips: spelling fixes 2023-08-31 19:47:43 +02:00
nios2 target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
openrisc target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
ppc target/ppc: use g_free() in test_opcode_table() 2023-09-08 13:08:52 +03:00
riscv target/riscv: Use existing lookup tables for MixColumns 2023-09-11 11:45:54 +10:00
rx include/exec: Replace target_ulong with abi_ptr in cpu_[st|ld]*() 2023-08-24 11:21:46 -07:00
s390x trace-events: Fix the name of the tracing.rst file 2023-09-08 13:08:51 +03:00
sh4 target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
sparc target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
tricore target/tricore: Replace gen_cond_w with tcg_gen_negsetcond_tl 2023-08-24 11:22:42 -07:00
xtensa target/xtensa: Include missing 'qemu/atomic.h' header 2023-08-31 19:47:43 +02:00
Kconfig hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00
meson.build target/loongarch: Add target build suport 2022-06-06 18:09:03 +00:00