aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/cpus.c b/cpus.c
index 898426ca56..9592163ff4 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1568,28 +1568,22 @@ CpuInfoList *qmp_query_cpus(Error **errp)
info->value->thread_id = cpu->thread_id;
#if defined(TARGET_I386)
info->value->arch = CPU_INFO_ARCH_X86;
- info->value->u.x86 = g_new0(CpuInfoX86, 1);
- info->value->u.x86->pc = env->eip + env->segs[R_CS].base;
+ info->value->u.x86.pc = env->eip + env->segs[R_CS].base;
#elif defined(TARGET_PPC)
info->value->arch = CPU_INFO_ARCH_PPC;
- info->value->u.ppc = g_new0(CpuInfoPPC, 1);
- info->value->u.ppc->nip = env->nip;
+ info->value->u.ppc.nip = env->nip;
#elif defined(TARGET_SPARC)
info->value->arch = CPU_INFO_ARCH_SPARC;
- info->value->u.q_sparc = g_new0(CpuInfoSPARC, 1);
- info->value->u.q_sparc->pc = env->pc;
- info->value->u.q_sparc->npc = env->npc;
+ info->value->u.q_sparc.pc = env->pc;
+ info->value->u.q_sparc.npc = env->npc;
#elif defined(TARGET_MIPS)
info->value->arch = CPU_INFO_ARCH_MIPS;
- info->value->u.q_mips = g_new0(CpuInfoMIPS, 1);
- info->value->u.q_mips->PC = env->active_tc.PC;
+ info->value->u.q_mips.PC = env->active_tc.PC;
#elif defined(TARGET_TRICORE)
info->value->arch = CPU_INFO_ARCH_TRICORE;
- info->value->u.tricore = g_new0(CpuInfoTricore, 1);
- info->value->u.tricore->PC = env->PC;
+ info->value->u.tricore.PC = env->PC;
#else
info->value->arch = CPU_INFO_ARCH_OTHER;
- info->value->u.other = g_new0(CpuInfoOther, 1);
#endif
/* XXX: waiting for the qapi to support GSList */