All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1841491] [NEW] floating point emulation can fail to set FE_UNDERFLOW
@ 2019-08-27  1:14 Paul Clarke
  2019-08-27  1:16 ` [Qemu-devel] [Bug 1841491] " Paul Clarke
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Paul Clarke @ 2019-08-27  1:14 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Floating point emulation can fail to set FE_UNDERFLOW in some
circumstances. This shows up often in glibc's "math" tests. A similar
test is attached.

This is similar to bug #1841442, but not the same problem, and I don't
think the fix will be in the same code.

On ppc64le native:
--
$ gcc -c -O2 fma.c
$ gcc -O2 test-fma.c fma.o -lm -o test-fma
$ ./test-fma $(./test-fma)
fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
0x0

0xa000000
FE_INEXACT FE_UNDERFLOW 
0x1p-1022
--

On qemu-system-ppc64:
--
$ ./test-fma $(./test-fma)
fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
0x0

0x2000000
FE_INEXACT 
0x1p-1022
--

QEMU versions vary, but not too much, and are pretty close to git HEAD:
- 586f3dced9 (HEAD -> master, origin/master, origin/HEAD) Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190822' into staging
- 864ab31 Update version for v4.1.0-rc4 release

There are worse symptoms on qemu-x86_64, but this is apparently not
surprising per https://bugs.launchpad.net/qemu/+bug/1841442/comments/6.

** Affects: qemu
     Importance: Undecided
         Status: New

** Attachment added: "testcase reporting exceptions set by simple floating point multiply-add"
   https://bugs.launchpad.net/bugs/1841491/+attachment/5284808/+files/test-fma.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/1841491

Title:
  floating point emulation can fail to set FE_UNDERFLOW

Status in QEMU:
  New

Bug description:
  Floating point emulation can fail to set FE_UNDERFLOW in some
  circumstances. This shows up often in glibc's "math" tests. A similar
  test is attached.

  This is similar to bug #1841442, but not the same problem, and I don't
  think the fix will be in the same code.

  On ppc64le native:
  --
  $ gcc -c -O2 fma.c
  $ gcc -O2 test-fma.c fma.o -lm -o test-fma
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0xa000000
  FE_INEXACT FE_UNDERFLOW 
  0x1p-1022
  --

  On qemu-system-ppc64:
  --
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0x2000000
  FE_INEXACT 
  0x1p-1022
  --

  QEMU versions vary, but not too much, and are pretty close to git HEAD:
  - 586f3dced9 (HEAD -> master, origin/master, origin/HEAD) Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190822' into staging
  - 864ab31 Update version for v4.1.0-rc4 release

  There are worse symptoms on qemu-x86_64, but this is apparently not
  surprising per
  https://bugs.launchpad.net/qemu/+bug/1841442/comments/6.

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


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

* [Qemu-devel] [Bug 1841491] Re: floating point emulation can fail to set FE_UNDERFLOW
  2019-08-27  1:14 [Qemu-devel] [Bug 1841491] [NEW] floating point emulation can fail to set FE_UNDERFLOW Paul Clarke
@ 2019-08-27  1:16 ` Paul Clarke
  2019-08-27  4:06 ` Paul Clarke
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paul Clarke @ 2019-08-27  1:16 UTC (permalink / raw)
  To: qemu-devel

** Attachment added: "2nd file of testcase"
   https://bugs.launchpad.net/qemu/+bug/1841491/+attachment/5284809/+files/fma.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/1841491

Title:
  floating point emulation can fail to set FE_UNDERFLOW

Status in QEMU:
  New

Bug description:
  Floating point emulation can fail to set FE_UNDERFLOW in some
  circumstances. This shows up often in glibc's "math" tests. A similar
  test is attached.

  This is similar to bug #1841442, but not the same problem, and I don't
  think the fix will be in the same code.

  On ppc64le native:
  --
  $ gcc -c -O2 fma.c
  $ gcc -O2 test-fma.c fma.o -lm -o test-fma
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0xa000000
  FE_INEXACT FE_UNDERFLOW 
  0x1p-1022
  --

  On qemu-system-ppc64:
  --
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0x2000000
  FE_INEXACT 
  0x1p-1022
  --

  QEMU versions vary, but not too much, and are pretty close to git HEAD:
  - 586f3dced9 (HEAD -> master, origin/master, origin/HEAD) Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190822' into staging
  - 864ab31 Update version for v4.1.0-rc4 release

  There are worse symptoms on qemu-x86_64, but this is apparently not
  surprising per
  https://bugs.launchpad.net/qemu/+bug/1841442/comments/6.

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


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

* [Qemu-devel] [Bug 1841491] Re: floating point emulation can fail to set FE_UNDERFLOW
  2019-08-27  1:14 [Qemu-devel] [Bug 1841491] [NEW] floating point emulation can fail to set FE_UNDERFLOW Paul Clarke
  2019-08-27  1:16 ` [Qemu-devel] [Bug 1841491] " Paul Clarke
@ 2019-08-27  4:06 ` Paul Clarke
  2019-08-27  4:08 ` Paul Clarke
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paul Clarke @ 2019-08-27  4:06 UTC (permalink / raw)
  To: qemu-devel

Responding to the patch https://lists.nongnu.org/archive/html/qemu-
ppc/2019-08/msg00404.html, it seems to work for "double", but not for
"float". Test case attached.

** Attachment added: "float testcase"
   https://bugs.launchpad.net/qemu/+bug/1841491/+attachment/5284810/+files/test-ffma.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/1841491

Title:
  floating point emulation can fail to set FE_UNDERFLOW

Status in QEMU:
  New

Bug description:
  Floating point emulation can fail to set FE_UNDERFLOW in some
  circumstances. This shows up often in glibc's "math" tests. A similar
  test is attached.

  This is similar to bug #1841442, but not the same problem, and I don't
  think the fix will be in the same code.

  On ppc64le native:
  --
  $ gcc -c -O2 fma.c
  $ gcc -O2 test-fma.c fma.o -lm -o test-fma
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0xa000000
  FE_INEXACT FE_UNDERFLOW 
  0x1p-1022
  --

  On qemu-system-ppc64:
  --
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0x2000000
  FE_INEXACT 
  0x1p-1022
  --

  QEMU versions vary, but not too much, and are pretty close to git HEAD:
  - 586f3dced9 (HEAD -> master, origin/master, origin/HEAD) Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190822' into staging
  - 864ab31 Update version for v4.1.0-rc4 release

  There are worse symptoms on qemu-x86_64, but this is apparently not
  surprising per
  https://bugs.launchpad.net/qemu/+bug/1841442/comments/6.

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


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

* [Qemu-devel] [Bug 1841491] Re: floating point emulation can fail to set FE_UNDERFLOW
  2019-08-27  1:14 [Qemu-devel] [Bug 1841491] [NEW] floating point emulation can fail to set FE_UNDERFLOW Paul Clarke
  2019-08-27  1:16 ` [Qemu-devel] [Bug 1841491] " Paul Clarke
  2019-08-27  4:06 ` Paul Clarke
@ 2019-08-27  4:08 ` Paul Clarke
  2019-08-27  4:29 ` Richard Henderson
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paul Clarke @ 2019-08-27  4:08 UTC (permalink / raw)
  To: qemu-devel

** Attachment added: "2nd file of float testcase"
   https://bugs.launchpad.net/qemu/+bug/1841491/+attachment/5284821/+files/ffma.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/1841491

Title:
  floating point emulation can fail to set FE_UNDERFLOW

Status in QEMU:
  New

Bug description:
  Floating point emulation can fail to set FE_UNDERFLOW in some
  circumstances. This shows up often in glibc's "math" tests. A similar
  test is attached.

  This is similar to bug #1841442, but not the same problem, and I don't
  think the fix will be in the same code.

  On ppc64le native:
  --
  $ gcc -c -O2 fma.c
  $ gcc -O2 test-fma.c fma.o -lm -o test-fma
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0xa000000
  FE_INEXACT FE_UNDERFLOW 
  0x1p-1022
  --

  On qemu-system-ppc64:
  --
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0x2000000
  FE_INEXACT 
  0x1p-1022
  --

  QEMU versions vary, but not too much, and are pretty close to git HEAD:
  - 586f3dced9 (HEAD -> master, origin/master, origin/HEAD) Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190822' into staging
  - 864ab31 Update version for v4.1.0-rc4 release

  There are worse symptoms on qemu-x86_64, but this is apparently not
  surprising per
  https://bugs.launchpad.net/qemu/+bug/1841442/comments/6.

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


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

* [Qemu-devel] [Bug 1841491] Re: floating point emulation can fail to set FE_UNDERFLOW
  2019-08-27  1:14 [Qemu-devel] [Bug 1841491] [NEW] floating point emulation can fail to set FE_UNDERFLOW Paul Clarke
                   ` (2 preceding siblings ...)
  2019-08-27  4:08 ` Paul Clarke
@ 2019-08-27  4:29 ` Richard Henderson
  2020-01-09 13:32 ` Thomas Huth
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2019-08-27  4:29 UTC (permalink / raw)
  To: qemu-devel

The float test failure is part of a larger problem for target/powerpc in
which all float routines are implemented incorrectly.  They are all
implemented as double operations with rounding to float as a second
step.  Which not only produces incorrect exceptions, as in this case,
but incorrect numerical results from the double rounding.

This should probably be split to a separate bug...

** Changed in: qemu
       Status: New => Confirmed

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

Title:
  floating point emulation can fail to set FE_UNDERFLOW

Status in QEMU:
  Confirmed

Bug description:
  Floating point emulation can fail to set FE_UNDERFLOW in some
  circumstances. This shows up often in glibc's "math" tests. A similar
  test is attached.

  This is similar to bug #1841442, but not the same problem, and I don't
  think the fix will be in the same code.

  On ppc64le native:
  --
  $ gcc -c -O2 fma.c
  $ gcc -O2 test-fma.c fma.o -lm -o test-fma
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0xa000000
  FE_INEXACT FE_UNDERFLOW 
  0x1p-1022
  --

  On qemu-system-ppc64:
  --
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0x2000000
  FE_INEXACT 
  0x1p-1022
  --

  QEMU versions vary, but not too much, and are pretty close to git HEAD:
  - 586f3dced9 (HEAD -> master, origin/master, origin/HEAD) Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190822' into staging
  - 864ab31 Update version for v4.1.0-rc4 release

  There are worse symptoms on qemu-x86_64, but this is apparently not
  surprising per
  https://bugs.launchpad.net/qemu/+bug/1841442/comments/6.

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


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

* [Bug 1841491] Re: floating point emulation can fail to set FE_UNDERFLOW
  2019-08-27  1:14 [Qemu-devel] [Bug 1841491] [NEW] floating point emulation can fail to set FE_UNDERFLOW Paul Clarke
                   ` (3 preceding siblings ...)
  2019-08-27  4:29 ` Richard Henderson
@ 2020-01-09 13:32 ` Thomas Huth
  2020-01-09 15:24 ` Paul Clarke
  2020-01-10  8:38 ` Thomas Huth
  6 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2020-01-09 13:32 UTC (permalink / raw)
  To: qemu-devel

A patch for this bug has been merged here:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=cbc65a8f22b29680f3
... can we close this ticket now or is there more to do?

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

Title:
  floating point emulation can fail to set FE_UNDERFLOW

Status in QEMU:
  Confirmed

Bug description:
  Floating point emulation can fail to set FE_UNDERFLOW in some
  circumstances. This shows up often in glibc's "math" tests. A similar
  test is attached.

  This is similar to bug #1841442, but not the same problem, and I don't
  think the fix will be in the same code.

  On ppc64le native:
  --
  $ gcc -c -O2 fma.c
  $ gcc -O2 test-fma.c fma.o -lm -o test-fma
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0xa000000
  FE_INEXACT FE_UNDERFLOW 
  0x1p-1022
  --

  On qemu-system-ppc64:
  --
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0x2000000
  FE_INEXACT 
  0x1p-1022
  --

  QEMU versions vary, but not too much, and are pretty close to git HEAD:
  - 586f3dced9 (HEAD -> master, origin/master, origin/HEAD) Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190822' into staging
  - 864ab31 Update version for v4.1.0-rc4 release

  There are worse symptoms on qemu-x86_64, but this is apparently not
  surprising per
  https://bugs.launchpad.net/qemu/+bug/1841442/comments/6.

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


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

* [Bug 1841491] Re: floating point emulation can fail to set FE_UNDERFLOW
  2019-08-27  1:14 [Qemu-devel] [Bug 1841491] [NEW] floating point emulation can fail to set FE_UNDERFLOW Paul Clarke
                   ` (4 preceding siblings ...)
  2020-01-09 13:32 ` Thomas Huth
@ 2020-01-09 15:24 ` Paul Clarke
  2020-01-10  8:38 ` Thomas Huth
  6 siblings, 0 replies; 8+ messages in thread
From: Paul Clarke @ 2020-01-09 15:24 UTC (permalink / raw)
  To: qemu-devel

Comment #5 suggested splitting the "float" issue to a separate bug,
which was done some time ago (bug #1841592).

I think this ticket can be closed.

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

Title:
  floating point emulation can fail to set FE_UNDERFLOW

Status in QEMU:
  Confirmed

Bug description:
  Floating point emulation can fail to set FE_UNDERFLOW in some
  circumstances. This shows up often in glibc's "math" tests. A similar
  test is attached.

  This is similar to bug #1841442, but not the same problem, and I don't
  think the fix will be in the same code.

  On ppc64le native:
  --
  $ gcc -c -O2 fma.c
  $ gcc -O2 test-fma.c fma.o -lm -o test-fma
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0xa000000
  FE_INEXACT FE_UNDERFLOW 
  0x1p-1022
  --

  On qemu-system-ppc64:
  --
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0x2000000
  FE_INEXACT 
  0x1p-1022
  --

  QEMU versions vary, but not too much, and are pretty close to git HEAD:
  - 586f3dced9 (HEAD -> master, origin/master, origin/HEAD) Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190822' into staging
  - 864ab31 Update version for v4.1.0-rc4 release

  There are worse symptoms on qemu-x86_64, but this is apparently not
  surprising per
  https://bugs.launchpad.net/qemu/+bug/1841442/comments/6.

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


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

* [Bug 1841491] Re: floating point emulation can fail to set FE_UNDERFLOW
  2019-08-27  1:14 [Qemu-devel] [Bug 1841491] [NEW] floating point emulation can fail to set FE_UNDERFLOW Paul Clarke
                   ` (5 preceding siblings ...)
  2020-01-09 15:24 ` Paul Clarke
@ 2020-01-10  8:38 ` Thomas Huth
  6 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2020-01-10  8:38 UTC (permalink / raw)
  To: qemu-devel

Ok, thanks for the pointer to the other bug! So I'm closing this one
now.

** Changed in: qemu
       Status: Confirmed => Fix Released

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

Title:
  floating point emulation can fail to set FE_UNDERFLOW

Status in QEMU:
  Fix Released

Bug description:
  Floating point emulation can fail to set FE_UNDERFLOW in some
  circumstances. This shows up often in glibc's "math" tests. A similar
  test is attached.

  This is similar to bug #1841442, but not the same problem, and I don't
  think the fix will be in the same code.

  On ppc64le native:
  --
  $ gcc -c -O2 fma.c
  $ gcc -O2 test-fma.c fma.o -lm -o test-fma
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0xa000000
  FE_INEXACT FE_UNDERFLOW 
  0x1p-1022
  --

  On qemu-system-ppc64:
  --
  $ ./test-fma $(./test-fma)
  fma(0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x0.0000000000001p-1022)
  0x0

  0x2000000
  FE_INEXACT 
  0x1p-1022
  --

  QEMU versions vary, but not too much, and are pretty close to git HEAD:
  - 586f3dced9 (HEAD -> master, origin/master, origin/HEAD) Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190822' into staging
  - 864ab31 Update version for v4.1.0-rc4 release

  There are worse symptoms on qemu-x86_64, but this is apparently not
  surprising per
  https://bugs.launchpad.net/qemu/+bug/1841442/comments/6.

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


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

end of thread, other threads:[~2020-01-10  8:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-27  1:14 [Qemu-devel] [Bug 1841491] [NEW] floating point emulation can fail to set FE_UNDERFLOW Paul Clarke
2019-08-27  1:16 ` [Qemu-devel] [Bug 1841491] " Paul Clarke
2019-08-27  4:06 ` Paul Clarke
2019-08-27  4:08 ` Paul Clarke
2019-08-27  4:29 ` Richard Henderson
2020-01-09 13:32 ` Thomas Huth
2020-01-09 15:24 ` Paul Clarke
2020-01-10  8:38 ` 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.