Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Nov 1995 12:37:43 -0800
From:      Mark Diekhans <markd@grizzly.com>
To:        freebsd-hackers@freebsd.org
Subject:   NPX still broken in 2.1.0-951104-SNAP...
Message-ID:  <199511052037.MAA05509@Grizzly.COM>

next in thread | raw e-mail | index | archive | help

It appears (from looking at the code) that the floating point exception
register is still broken in the latest SNAP.  I bug reported this eons ago
against 2.0, it generated a bit of discussion and I believe I got a response
to the bug report saying it was fixed.  This breaks pretty much any program
that wants to get a status back from the floating point math functions instead
of a core dump.  Tcl is most notable, but it breaks several other packages as
well.

This program should not core dump:

#include <math.h>
#include <stdio.h>
main ()
{
    printf ("acos (2.0) = %g\n", acos (2.0));
}

Please fix this before releasing, its a big pain for us portable
software maintainers.  This patch fixed it for me:

*** sys/i386/include/npx.h.ORG	Tue Jan 17 21:51:47 1995
--- sys/i386/include/npx.h	Sat Jan 21 12:56:44 1995
***************
*** 133,139 ****
  #define	__INITIAL_NPXCW__	__iBCS_NPXCW__
  #endif
  #else
! #define	__INITIAL_NPXCW__	__BDE_NPXCW__
  #endif
  
  #ifdef KERNEL
--- 133,139 ----
  #define	__INITIAL_NPXCW__	__iBCS_NPXCW__
  #endif
  #else
! #define	__INITIAL_NPXCW__	__BETTER_BDE_NPXCW__
  #endif
  
  #ifdef KERNEL



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511052037.MAA05509>