]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/ppc: Fix fallback to MFSS for MFFS* instructions on pre 3.0 ISAs
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 May 2023 11:19:13 +0000 (12:19 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 31 May 2023 06:42:36 +0000 (09:42 +0300)
commit864ce70c1c747898063cc2df854920d354b1b78f
tree930a3e4022727a462e42d0a0f62821c593484652
parent25b846c85e4c9fb911673e31d474208b28dfd01a
target/ppc: Fix fallback to MFSS for MFFS* instructions on pre 3.0 ISAs

The following commits changed the code such that the fallback to MFSS for MFFSCRN,
MFFSCRNI, MFFSCE and MFFSL on pre 3.0 ISAs was removed and became an illegal instruction:

  bf8adfd88b547680aa857c46098f3a1e94373160 - target/ppc: Move mffscrn[i] to decodetree
  394c2e2fda70da722f20fb60412d6c0ca4bfaa03 - target/ppc: Move mffsce to decodetree
  3e5bce70efe6bd1f684efbb21fd2a316cbf0657e - target/ppc: Move mffsl to decodetree

The hardware will handle them as a MFFS instruction as the code did previously.
This means applications that were segfaulting under qemu when encountering these
instructions which is used in glibc libm functions for example.

The fallback for MFFSCDRN and MFFSCDRNI added in a later patch was also missing.

This patch restores the fallback to MFSS for these instructions on pre 3.0s ISAs
as the hardware decoder would, fixing the segfaulting libm code. It doesn't have
the fallback for 3.0 onwards to match hardware behaviour.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Reviewed-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230510111913.1718734-1-richard.purdie@linuxfoundation.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
(cherry picked from commit 5260ecffd24e36c029849f379c8b9cc3d099c879)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/ppc/insn32.decode
target/ppc/translate/fp-impl.c.inc