All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1841990] [NEW] instruction 'denbcdq' misbehaving
@ 2019-08-29 20:29 Paul Clarke
  2019-08-30  6:29 ` [Qemu-devel] [Bug 1841990] " Alex Bennée
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Paul Clarke @ 2019-08-29 20:29 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Instruction 'denbcdq' appears to have no effect.  Test case attached.

On ppc64le native:
--
gcc -g -O -mcpu=power9 bcdcfsq.c test-denbcdq.c -o test-denbcdq
$ ./test-denbcdq
0x00000000000000000000000000000000
0x0000000000000000000000000000000c
0x22080000000000000000000000000000
$ ./test-denbcdq 1
0x00000000000000000000000000000001
0x0000000000000000000000000000001c
0x22080000000000000000000000000001
$ ./test-denbcdq $(seq 0 99)
0x00000000000000000000000000000064
0x0000000000000000000000000000100c
0x22080000000000000000000000000080
--

With "qemu-ppc64le -cpu power9"
--
$ qemu-ppc64le -cpu power9 -L [...] ./test-denbcdq
0x00000000000000000000000000000000
0x0000000000000000000000000000000c
0x0000000000000000000000000000000c
$ qemu-ppc64le -cpu power9 -L [...] ./test-denbcdq 1
0x00000000000000000000000000000001
0x0000000000000000000000000000001c
0x0000000000000000000000000000001c
$ qemu-ppc64le -cpu power9 -L [...] ./test-denbcdq $(seq 100)
0x00000000000000000000000000000064
0x0000000000000000000000000000100c
0x0000000000000000000000000000100c
--

I started looking at the code, but I got confused rather quickly.  Could
be related to endianness? I think denbcdq arrived on the scene before
little-endian was a big deal.  Maybe something to do with utilizing
implicit floating-point register pairs...  I don't think the right data
is getting to helper_denbcdq, which would point back to the gen_fprp_ptr
uses in dfp-impl.inc.c (GEN_DFP_T_FPR_I32_Rc).  (Maybe?)

** Affects: qemu
     Importance: Undecided
         Status: New

** Attachment added: "test case for using denbcdq"
   https://bugs.launchpad.net/bugs/1841990/+attachment/5285701/+files/test-denbcdq.c

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

Title:
  instruction 'denbcdq' misbehaving

Status in QEMU:
  New

Bug description:
  Instruction 'denbcdq' appears to have no effect.  Test case attached.

  On ppc64le native:
  --
  gcc -g -O -mcpu=power9 bcdcfsq.c test-denbcdq.c -o test-denbcdq
  $ ./test-denbcdq
  0x00000000000000000000000000000000
  0x0000000000000000000000000000000c
  0x22080000000000000000000000000000
  $ ./test-denbcdq 1
  0x00000000000000000000000000000001
  0x0000000000000000000000000000001c
  0x22080000000000000000000000000001
  $ ./test-denbcdq $(seq 0 99)
  0x00000000000000000000000000000064
  0x0000000000000000000000000000100c
  0x22080000000000000000000000000080
  --

  With "qemu-ppc64le -cpu power9"
  --
  $ qemu-ppc64le -cpu power9 -L [...] ./test-denbcdq
  0x00000000000000000000000000000000
  0x0000000000000000000000000000000c
  0x0000000000000000000000000000000c
  $ qemu-ppc64le -cpu power9 -L [...] ./test-denbcdq 1
  0x00000000000000000000000000000001
  0x0000000000000000000000000000001c
  0x0000000000000000000000000000001c
  $ qemu-ppc64le -cpu power9 -L [...] ./test-denbcdq $(seq 100)
  0x00000000000000000000000000000064
  0x0000000000000000000000000000100c
  0x0000000000000000000000000000100c
  --

  I started looking at the code, but I got confused rather quickly.
  Could be related to endianness? I think denbcdq arrived on the scene
  before little-endian was a big deal.  Maybe something to do with
  utilizing implicit floating-point register pairs...  I don't think the
  right data is getting to helper_denbcdq, which would point back to the
  gen_fprp_ptr uses in dfp-impl.inc.c (GEN_DFP_T_FPR_I32_Rc).  (Maybe?)

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


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

end of thread, other threads:[~2021-05-02 18:24 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 20:29 [Qemu-devel] [Bug 1841990] [NEW] instruction 'denbcdq' misbehaving Paul Clarke
2019-08-30  6:29 ` [Qemu-devel] [Bug 1841990] " Alex Bennée
2019-08-30  7:32 ` Philippe Mathieu-Daudé
2019-08-30  8:12 ` Philippe Mathieu-Daudé
2019-08-30 13:14 ` Paul Clarke
2019-08-30 17:40 ` Philippe Mathieu-Daudé
2019-08-31 17:52 ` Mark Cave-Ayland
2019-08-31 21:16 ` Paul Clarke
2019-09-24 15:54 ` Mark Cave-Ayland
2019-09-25 17:51 ` Paul Clarke
2019-09-25 19:09 ` Mark Cave-Ayland
2019-09-25 21:21 ` Paul Clarke
2019-09-26  5:47 ` Mark Cave-Ayland
2019-09-26 14:08 ` Paul Clarke
2019-09-26 16:00 ` Mark Cave-Ayland
2019-09-26 16:26 ` Paul Clarke
2019-09-26 16:43 ` Paul Clarke
2019-09-26 16:59 ` Mark Cave-Ayland
2019-09-26 17:31 ` Paul Clarke
2019-09-26 17:57 ` Mark Cave-Ayland
2021-05-02 18:09 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.