On 6/2/25 19:18, Philippe Mathieu-Daudé wrote:
"cpu.h" is target-specific. Definitions which can be used
by hw/ code when building QOM blocks can be in "cpu-qom.h",
which is target-agnostic.
What I'm trying to allow here are QOM uses such:
../../hw/riscv/opentitan.c:199:61: error: use of undeclared identifier
'IRQ_M_EXT'
199 | qdev_get_gpio_in(DEVICE(cpu),
IRQ_M_EXT));
| ^
../../hw/riscv/opentitan.c:230:44: error: use of undeclared identifier
'IRQ_M_TIMER'; did you mean 'IBEX_TIMER'?
230 | IRQ_M_TIMER));
| ^~~~~~~~~~~
Move the MISA bits (removing the pointless target_ulong cast)
and the IRQ index definitions.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
target/riscv/cpu-qom.h | 40 ++++++++++++++++++++++++++++++++++++++++
target/riscv/cpu.h | 24 ------------------------
target/riscv/cpu_bits.h | 15 ---------------
3 files changed, 40 insertions(+), 39 deletions(-)