The attached patch is incorrect (using the softfloat _min/_max functions will 
give wrong answers for some special cases). The correct macros are
#define FPU_MIN(size, a, b) float ## size ## _lt(a, b, &env->sse_status) ? (a) 
: (b)
#define FPU_MAX(size, a, b) float ## size ## _lt(b, a, &env->sse_status) ? (a) 
: (b)

(see recent discussion on the qemu-devel list).

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

Title:
  x86: FPU_MAX, FPU_MIN incorrect

Status in QEMU:
  New

Bug description:
  Dear All,

  Bug was found in qemu.git.
  Now (0.15, 1.0) all fpu is softfpu.
  See target-i386/ops_sse.h:
  #define FPU_MIN(size, a, b) (a) < (b) ? (a) : (b)
  #define FPU_MAX(size, a, b) (a) > (b) ? (a) : (b)
  It is incorrect now, becouse float64 (or 32) is (typedef) uint64_t (or 32).
  And if we have signed operands we get error...

  There is a test with this error (spec shinx3 test data, results diffs
  on machine and qemu (linux)) and fixed patch. See attach.

  Daniil.

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

Reply via email to