diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-10-06 10:58:06 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-11-07 12:13:27 +0100 |
commit | 2d56be5a29eb05e33d9fb74bdf55013c5016d5ba (patch) | |
tree | 7afef9daf6cec7f5fe1b8843b8f367e8d549d538 /target/rx | |
parent | 66125f9360f2d698d772d045d1665ff6d380c6c7 (diff) | |
download | qemu-2d56be5a29eb05e33d9fb74bdf55013c5016d5ba.zip qemu-2d56be5a29eb05e33d9fb74bdf55013c5016d5ba.tar.gz qemu-2d56be5a29eb05e33d9fb74bdf55013c5016d5ba.tar.bz2 |
target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h'
Hegerogeneous code needs access to the FOO_CPU_TYPE_NAME()
macro to resolve target CPU types. Move the declaration
(along with the required FOO_CPU_TYPE_SUFFIX) to "cpu-qom.h".
"target/foo/cpu-qom.h" is supposed to be target agnostic
(include-able by any target). Add such mention in the
header.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231013140116.255-7-philmd@linaro.org>
Diffstat (limited to 'target/rx')
-rw-r--r-- | target/rx/cpu-qom.h | 5 | ||||
-rw-r--r-- | target/rx/cpu.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/target/rx/cpu-qom.h b/target/rx/cpu-qom.h index f4cd566..6213d87 100644 --- a/target/rx/cpu-qom.h +++ b/target/rx/cpu-qom.h @@ -1,5 +1,5 @@ /* - * RX CPU + * QEMU RX CPU QOM header (target agnostic) * * Copyright (c) 2019 Yoshinori Sato * @@ -28,6 +28,9 @@ OBJECT_DECLARE_CPU_TYPE(RXCPU, RXCPUClass, RX_CPU) +#define RX_CPU_TYPE_SUFFIX "-" TYPE_RX_CPU +#define RX_CPU_TYPE_NAME(model) model RX_CPU_TYPE_SUFFIX + /* * RXCPUClass: * @parent_realize: The parent class' realize handler. diff --git a/target/rx/cpu.h b/target/rx/cpu.h index 8379f4a..c816137 100644 --- a/target/rx/cpu.h +++ b/target/rx/cpu.h @@ -112,8 +112,6 @@ struct ArchCPU { CPURXState env; }; -#define RX_CPU_TYPE_SUFFIX "-" TYPE_RX_CPU -#define RX_CPU_TYPE_NAME(model) model RX_CPU_TYPE_SUFFIX #define CPU_RESOLVING_TYPE TYPE_RX_CPU const char *rx_crname(uint8_t cr); |