target/riscv: iterate over a table of decoders
authorPhilipp Tomsich <philipp.tomsich@vrull.eu>
Wed, 2 Feb 2022 00:52:47 +0000 (01:52 +0100)
committerAlistair Francis <alistair.francis@wdc.com>
Wed, 16 Feb 2022 02:24:18 +0000 (12:24 +1000)
commit5e199b6bdc544658ecc9d614779b2cf3fe215ead
treea0cc287900863d9a103b6d9d06c0e41dca9fa6e1
parentf2a32bec8f0da993f67698b6c7ebd60e0f19622e
target/riscv: iterate over a table of decoders

To split up the decoder into multiple functions (both to support
vendor-specific opcodes in separate files and to simplify maintenance
of orthogonal extensions), this changes decode_op to iterate over a
table of decoders predicated on guard functions.

This commit only adds the new structure and the table, allowing for
the easy addition of additional decoders in the future.

Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220202005249.3566542-6-philipp.tomsich@vrull.eu>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/translate.c