Revision | d496ec82defefbb8b96a6cf80ff102bedca74c8b (tree) |
---|---|
Time | 2019-06-07 18:01:01 |
Author | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
target/rx: Remove suffix in cpu class.
New CPUs should not be suffixed like other devices.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
@@ -30,7 +30,7 @@ | ||
30 | 30 | #include "target/rx/cpu.h" |
31 | 31 | #include "qemu/units.h" |
32 | 32 | |
33 | -#define TYPE_RX62N "rx62n" | |
33 | +#define TYPE_RX62N "rx62n-mcu" | |
34 | 34 | #define TYPE_RX62N_CPU RX_CPU_TYPE_NAME(TYPE_RX62N) |
35 | 35 | #define RX62N(obj) OBJECT_CHECK(RX62NState, (obj), TYPE_RX62N) |
36 | 36 |
@@ -72,9 +72,8 @@ static void rx_cpu_reset(CPUState *s) | ||
72 | 72 | static void rx_cpu_list_entry(gpointer data, gpointer user_data) |
73 | 73 | { |
74 | 74 | const char *typename = object_class_get_name(OBJECT_CLASS(data)); |
75 | - int len = strlen(typename) - strlen(RX_CPU_TYPE_SUFFIX); | |
76 | 75 | |
77 | - qemu_printf(" %.*s\n", len, typename); | |
76 | + qemu_printf(" %s\n", typename); | |
78 | 77 | } |
79 | 78 | |
80 | 79 | void rx_cpu_list(void) |
@@ -89,11 +88,8 @@ void rx_cpu_list(void) | ||
89 | 88 | static ObjectClass *rx_cpu_class_by_name(const char *cpu_model) |
90 | 89 | { |
91 | 90 | ObjectClass *oc; |
92 | - char *typename; | |
93 | 91 | |
94 | - typename = g_strdup_printf(RX_CPU_TYPE_NAME("%s"), cpu_model); | |
95 | - oc = object_class_by_name(typename); | |
96 | - g_free(typename); | |
92 | + oc = object_class_by_name(cpu_model); | |
97 | 93 | |
98 | 94 | if (oc == NULL || |
99 | 95 | object_class_is_abstract(oc) || |
@@ -164,8 +164,7 @@ static inline RXCPU *rx_env_get_cpu(CPURXState *env) | ||
164 | 164 | |
165 | 165 | #define ENV_OFFSET offsetof(RXCPU, env) |
166 | 166 | |
167 | -#define RX_CPU_TYPE_SUFFIX "-" TYPE_RX_CPU | |
168 | -#define RX_CPU_TYPE_NAME(model) model RX_CPU_TYPE_SUFFIX | |
167 | +#define RX_CPU_TYPE_NAME(model) model | |
169 | 168 | #define CPU_RESOLVING_TYPE TYPE_RX_CPU |
170 | 169 | |
171 | 170 | extern const char rx_crname[][6]; |