qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix mtfsf, mtfsfi and mtfsb1 bug
@ 2021-10-20 12:57 Lucas Mateus Castro (alqotel)
  2021-10-20 12:57 ` [PATCH 1/2] target/ppc: Fixed call to deferred exception Lucas Mateus Castro (alqotel)
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Lucas Mateus Castro (alqotel) @ 2021-10-20 12:57 UTC (permalink / raw)
  To: qemu-devel, qemu-ppc
  Cc: Lucas Mateus Castro (alqotel), richard.henderson, david

From: "Lucas Mateus Castro (alqotel)" <lucas.castro@eldorado.org.br>

The instructions mtfsf, mtfsfi and mtfsb, when called, fail to set the FI
bit (bit 46 in the FPSCR) and can set to 1 the reserved bit 52 of the
FPSCR, as reported in https://gitlab.com/qemu-project/qemu/-/issues/266
(although the bug report is only for mtfsf, the bug applies to mtfsfi and
mtfsb1 as well).

These instructions also fail to throw an exception when the exception
and enabling bits are set, this can be tested by adding
'prctl(PR_SET_FPEXC, PR_FP_EXC_PRECISE);' before the __builtin_mtfsf
call in the test case of the bug report.
 
These patches aim to fix these issues.

Lucas Mateus Castro (alqotel) (2):
  target/ppc: Fixed call to deferred exception
  target/ppc: ppc_store_fpscr doesn't update bit 52

 target/ppc/cpu.c                   |  2 +-
 target/ppc/cpu.h                   |  3 +++
 target/ppc/fpu_helper.c            | 41 ++++++++++++++++++++++++++++++
 target/ppc/helper.h                |  1 +
 target/ppc/translate/fp-impl.c.inc |  6 ++---
 5 files changed, 49 insertions(+), 4 deletions(-)

-- 
2.31.1



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-11-16 14:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 12:57 [PATCH 0/2] Fix mtfsf, mtfsfi and mtfsb1 bug Lucas Mateus Castro (alqotel)
2021-10-20 12:57 ` [PATCH 1/2] target/ppc: Fixed call to deferred exception Lucas Mateus Castro (alqotel)
2021-11-09 16:37   ` Daniel Henrique Barboza
2021-11-10  6:56     ` Cédric Le Goater
2021-11-10 17:29       ` Lucas Mateus Martins Araujo e Castro
2021-11-16 14:43         ` Cédric Le Goater
2021-11-10  8:19   ` Mark Cave-Ayland
2021-11-10 18:58     ` Lucas Mateus Martins Araujo e Castro
2021-11-10 20:40       ` BALATON Zoltan
2021-11-12  2:31         ` 罗勇刚(Yonggang Luo)
2021-10-20 12:57 ` [PATCH 2/2] target/ppc: ppc_store_fpscr doesn't update bit 52 Lucas Mateus Castro (alqotel)
2021-11-09 16:44   ` Daniel Henrique Barboza
2021-11-10 19:07     ` Lucas Mateus Martins Araujo e Castro
2021-10-27 11:49 ` [PATCH 0/2] Fix mtfsf, mtfsfi and mtfsb1 bug Matheus K. Ferst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).