target/riscv: Factor out extension tests to cpu_cfg.h
commit2e8c1e0215449eb0a88bbb3fae2f6277777611c3
authorChristoph Müllner <christoph.muellner@vrull.eu>
Mon, 12 Jun 2023 11:10:28 +0000 (12 13:10 +0200)
committerAlistair Francis <alistair.francis@wdc.com>
Mon, 10 Jul 2023 12:29:14 +0000 (10 22:29 +1000)
treea10fe4b5b1f7618f0e91e82ea2607323778b20bd
parent94692c3a34d9e2e149bd9db188425e9da6e578c6
target/riscv: Factor out extension tests to cpu_cfg.h

This patch moves the extension test functions that are used
to gate vendor extension decoders, into cpu_cfg.h.
This allows to reuse them in the disassembler.

This patch does not introduce new functionality.
However, the patch includes a small change:
The parameter for the extension test functions has been changed
from 'DisasContext*' to 'const RISCVCPUConfig*' to keep
the code in cpu_cfg.h self-contained.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn>
Message-Id: <20230612111034.3955227-3-christoph.muellner@vrull.eu>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu_cfg.h
target/riscv/translate.c