|
| From: | Philippe Mathieu-Daudé |
| Subject: | Re: [PATCH 10/18] target/riscv: Inline target specific TYPE_RISCV_CPU_BASE definition |
| Date: | Fri, 13 Oct 2023 15:58:53 +0200 |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 |
On 13/10/23 06:13, Richard Henderson wrote:
On 10/10/23 02:28, Philippe Mathieu-Daudé wrote:TYPE_RISCV_CPU_BASE depends on the TARGET_RISCV32/TARGET_RISCV64 definitions which are target specific. Such target specific definition taints "cpu-qom.h". Since "cpu-qom.h" must be target agnostic, remove its target specific definition uses by inlining TYPE_RISCV_CPU_BASE in the two machines using it. "target/riscv/cpu-qom.h" is now fully target agnostic. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- target/riscv/cpu-qom.h | 8 +------- hw/riscv/spike.c | 8 +++++++- hw/riscv/virt.c | 8 +++++++- 3 files changed, 15 insertions(+), 9 deletions(-)
@@ -43,12 +43,6 @@#define TYPE_RISCV_CPU_VEYRON_V1 RISCV_CPU_TYPE_NAME("veyron-v1")#define TYPE_RISCV_CPU_HOST RISCV_CPU_TYPE_NAME("host") -#if defined(TARGET_RISCV32) -# define TYPE_RISCV_CPU_BASE TYPE_RISCV_CPU_BASE32 -#elif defined(TARGET_RISCV64) -# define TYPE_RISCV_CPU_BASE TYPE_RISCV_CPU_BASE64 -#endifMove to cpu.h (or elsewhere) instead of replicating in two hw/ files?
Yes, better.
| [Prev in Thread] | Current Thread | [Next in Thread] |