target/ppc: move opcode decode tables to PowerPCCPU
authorAlex Bennée <alex.bennee@linaro.org>
Tue, 16 Jul 2019 12:13:52 +0000 (13:13 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 21 Aug 2019 07:17:11 +0000 (17:17 +1000)
commit28876bf27d2792e6b16cfb5283b9fb959fc0ad12
tree953ad59dd8b360d02713357917f961d21047ed1c
parent4e6d0920e7547e6af4bbac5ffe9adfe6ea621822
target/ppc: move opcode decode tables to PowerPCCPU

The opcode decode tables aren't really part of the CPUPPCState but an
internal implementation detail for the translator. This can cause
problems with memcpy in cpu_copy as any table created during
ppc_cpu_realize get written over causing a memory leak. To avoid this
move the tables into PowerPCCPU which is better suited to hold
internal implementation details.

Attempts to fix: https://bugs.launchpad.net/qemu/+bug/1836558
Cc: 1836558@bugs.launchpad.net
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20190716121352.302-1-alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/cpu.h
target/ppc/translate.c
target/ppc/translate_init.inc.c