qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/8] target/sparc: Fix VIS fmul8x16al instruction.


From: Richard Henderson
Subject: Re: [PATCH 3/8] target/sparc: Fix VIS fmul8x16al instruction.
Date: Thu, 28 Sep 2023 14:32:58 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

On 9/24/23 01:03, Nick Bowler wrote:
On a real UltraSparc II, the fmul8x16al instruction takes two single-
precision input operands and returns a double-precision result.  For
the second operand, bits 15:0 are used, and bits 31:16 are ignored.

However, the emulation is taking two double-precision input operands,
and furthermore it is using bits 31:16 of the second operand (ignoring
bits 15:0).  These are unlikely to contain the correct values.

Even still, the emulator overwrites the second input before all outputs
are calculated, so even if by chance the data loaded in happens to be
correct, the results are just garbage except in trivial cases.

Signed-off-by: Nick Bowler<nbowler@draconx.ca>
---
  target/sparc/helper.h     |  2 +-
  target/sparc/translate.c  |  2 +-
  target/sparc/vis_helper.c | 11 ++++++-----
  3 files changed, 8 insertions(+), 7 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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