qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Bug 1923629] [NEW] RISC-V Vector Instruction vssub.vv not saturating
@ 2021-04-13 15:21 Tony Cole
  2021-04-15  3:57 ` Alistair Francis
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Tony Cole @ 2021-04-13 15:21 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

I noticed doing a negate ( 0 – 0x80000000 ) using vssub.vv produces an
incorrect result of 0x80000000 (should saturate to 0x7FFFFFFF).

Here is the bit of the code:

		vmv.v.i		v16, 0
		…
8f040457	vssub.vv	v8,v16,v8

I believe the instruction encoding is correct (vssub.vv with vd = v8,
vs2 = v16, rs1 = v8), but the result does not saturate in QEMU.

I’ve just tested with what I think is the latest branch (
https://github.com/sifive/qemu/tree/rvv-1.0-upstream-v7 commit 26 Feb
2021: 1151361fa7d45cc90d69086ccf1a4d8397931811 ) and the problem still
exists.

** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: riscv vector

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1923629

Title:
  RISC-V Vector Instruction vssub.vv not saturating

Status in QEMU:
  New

Bug description:
  I noticed doing a negate ( 0 – 0x80000000 ) using vssub.vv produces an
  incorrect result of 0x80000000 (should saturate to 0x7FFFFFFF).

  Here is the bit of the code:

  		vmv.v.i		v16, 0
  		…
  8f040457	vssub.vv	v8,v16,v8

  I believe the instruction encoding is correct (vssub.vv with vd = v8,
  vs2 = v16, rs1 = v8), but the result does not saturate in QEMU.

  I’ve just tested with what I think is the latest branch (
  https://github.com/sifive/qemu/tree/rvv-1.0-upstream-v7 commit 26 Feb
  2021: 1151361fa7d45cc90d69086ccf1a4d8397931811 ) and the problem still
  exists.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1923629/+subscriptions


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

end of thread, other threads:[~2021-08-25  7:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 15:21 [Bug 1923629] [NEW] RISC-V Vector Instruction vssub.vv not saturating Tony Cole
2021-04-15  3:57 ` Alistair Francis
2021-04-15  4:00   ` Kito Cheng
2021-04-15  4:18   ` LIU Zhiwei
2021-04-15  4:42     ` Alistair Francis
2021-04-15  4:42 ` [Bug 1923629] " Alistair Francis
2021-04-15  7:31 ` Frank Chang
2021-05-12 23:58 ` Alistair Francis
2021-08-25  7:18 ` Thomas Huth

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).