target/riscv: use RISCVException enum in exception helpers
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>
Mon, 6 Jan 2025 17:37:33 +0000 (14:37 -0300)
committerAlistair Francis <alistair.francis@wdc.com>
Sat, 18 Jan 2025 23:44:34 +0000 (09:44 +1000)
commite2dca2dc5abfba504d4ac9222673a9edbc1c1266
tree08570ccbaa1645d0cac6c778bd4ff178a70de32a
parentf4df21e07f126eab24adf505cb33db0c94968cab
target/riscv: use RISCVException enum in exception helpers

Do a cosmetic change in riscv_raise_exception() to change 'exception'
type from uint32_t to RISCVException, making it a bit clear that the
arg is directly correlated to the RISCVException enum.

As a side effect, change 'excp' type from int to RISCVException in
generate_exception() to guarantee that all callers of
riscv_raise_exception() will use the enum.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250106173734.412353-2-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu.h
target/riscv/op_helper.c
target/riscv/translate.c