On 14/10/2021 20:43, Richard Henderson wrote:
[E-MAIL EXTERNO] Não clique em links ou abra anexos, a menos que você
possa confirmar o remetente e saber que o conteúdo é seguro. Em caso de
e-mail suspeito entre imediatamente em contato com o DTI.
On 10/14/21 3:32 PM, [email protected] wrote:
From: Matheus Ferst <[email protected]>
We should use cpu_read_xer/cpu_write_xer to save/restore the complete
register since some of its bits are in other fields of CPUPPCState. A
test is added to prevent future regressions.
Fixes: da91a00f191f ("target-ppc: Split out SO, OV, CA fields from XER")
Signed-off-by: Matheus Ferst <[email protected]>
---
linux-user/ppc/signal.c | 9 +++--
tests/tcg/ppc64/Makefile.target | 2 +
tests/tcg/ppc64le/Makefile.target | 2 +
tests/tcg/ppc64le/signal_save_restore_xer.c | 42 +++++++++++++++++++++
4 files changed, 52 insertions(+), 3 deletions(-)
create mode 100644 tests/tcg/ppc64le/signal_save_restore_xer.c
The code is good so,
Reviewed-by: Richard Henderson <[email protected]>
+ sigaction(SIGILL, &sa, NULL);
+
+ asm("mtspr 1, %1\n\t"
+ ".long 0x0\n\t"
While Appendix B does guarantee that "0" is and always will be an
invalid instruction, I
wonder if the test itself would be clearer (i.e. self-documenting the
intent) using
SIGTRAP and "trap".
r~
It would be better, but cpu_loop is currently calling cpu_abort for
POWERPC_EXCP_TRAP, so the test would fail. I'll see if I can fix that in
another patch, and then we can change the test to use trap.
--
Matheus K. Ferst
Instituto de Pesquisas ELDORADO <http://www.eldorado.org.br/>
Analista de Software Júnior
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>