]> git.proxmox.com Git - mirror_qemu.git/commit - target/ppc/cpu.c
target/ppc: ppc_store_fpscr doesn't update bits 0 to 28 and 52
authorLucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br>
Fri, 17 Dec 2021 16:57:13 +0000 (17:57 +0100)
committerCédric Le Goater <clg@kaod.org>
Fri, 17 Dec 2021 16:57:13 +0000 (17:57 +0100)
commit25ee608d79c1890c0f4e8c495ec8629d5712de45
treed9b9ac6fc9afb2b731499964b17add0a7f2896be
parent00d38802513da6141a732ef7c3619bd0f8f01a8e
target/ppc: ppc_store_fpscr doesn't update bits 0 to 28 and 52

This commit fixes the difference reported in the bug in the reserved
bit 52, it does this by adding this bit to the mask of bits to not be
directly altered in the ppc_store_fpscr function (the hardware used to
compare to QEMU was a Power9).

The bits 0 to 27 were also added to the mask, as they are marked as
reserved in the PowerISA and bit 28 is a reserved extension of the DRN
field (bits 29:31) but can't be set using mtfsfi, while the other DRN
bits may be set using mtfsfi instruction, so bit 28 was also added to
the mask.

Although this is a difference reported in the bug, since it's a reserved
bit it may be a "don't care" case, as put in the bug report. Looking at
the ISA it doesn't explicitly mention this bit can't be set, like it
does for FEX and VX, so I'm unsure if this is necessary.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/266
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br>
Message-Id: <20211201163808.440385-4-lucas.araujo@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
target/ppc/cpu.c
target/ppc/cpu.h