linux-user: Fix XER access in ppc version of elf_core_copy_regs
commit10de0521889d36633450e35b22f6a45ef856226d
authorMatheus Ferst <matheus.ferst@eldorado.org.br>
Thu, 14 Oct 2021 22:32:33 +0000 (14 19:32 -0300)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 21 Oct 2021 00:42:47 +0000 (21 11:42 +1100)
tree2c0c50429931db377dae0ea34edefba8f00b908f
parent7974dc5900f7c128232782b0b39ccd40001bdb08
linux-user: Fix XER access in ppc version of elf_core_copy_regs

env->xer doesn't hold some bits of XER, like OV and CA. To write the
complete register in the core dump we should read XER value with
cpu_read_xer.

Reported-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br>
Fixes: da91a00f191f ("target-ppc: Split out SO, OV, CA fields from XER")
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211014223234.127012-4-matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
linux-user/elfload.c
target/ppc/cpu.c
target/ppc/cpu.h