qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/8] SPARC VIS fixes


From: Nick Bowler
Subject: [PATCH 0/8] SPARC VIS fixes
Date: Mon, 25 Sep 2023 01:03:49 -0400

I noticed that the fmul8x16 instruction did not appear to be emulated
correctly[1].  It would seem that emulation was not using a single-
precision input register like the real hardware does, but rather a
double-precision register, causing it to operate on the wrong data.

Every other VIS instruction which contains one or more single-precision
inputs and a double-precision output has the exact same problem.

A few computational problems are found and fixed by this series too.

All patches can be applied independently, except patch 2 adds some
helpers which are subsequently needed by patches 3, 4 and 5.

Emulation results are tested by manually comparing the output of a small
Linux test program on an UltraSparc II against the output of running the
same binary under qemu-sparc32plus on a ppc64le host system.

[1] https://gitlab.com/qemu-project/qemu/-/issues/1901

Nick Bowler (8):
  target/sparc: Fix VIS fmul8x16 input register.
  target/sparc: Fix VIS fmul8x16au instruction.
  target/sparc: Fix VIS fmul8x16al instruction.
  target/sparc: Fix VIS fmuld8sux16 instruction.
  target/sparc: Fix VIS fmuld8ulx16 instruction.
  target/sparc: Fix VIS fpmerge input registers.
  target/sparc: Fix VIS fexpand input register.
  target/sparc: Fix VIS subtraction instructions.

 target/sparc/helper.h     |  14 ++---
 target/sparc/translate.c  |  42 +++++++++++---
 target/sparc/vis_helper.c | 119 +++++++++++++++++++-------------------
 3 files changed, 101 insertions(+), 74 deletions(-)

-- 
2.41.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]