*BSD News Article 84565


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!ames!enews.sgi.com!news.mathworks.com!news-peer.gsl.net!news.gsl.net!uwm.edu!uwvax!newssinet!chiba-ns!odins-suita!kuee-news!kuis-news!sakura.kudpc!cancer.nca5.ad.jp!nfeed.gw.nagoya-u.ac.jp!news.cc.nagoya-u.ac.jp!marble!kato
From: kato@eclogite.eps.nagoya-u.ac.jp (KATO Takenori)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Cyrix 387 error reporting broken
Date: 9 Dec 1996 03:58:29 GMT
Organization: Earth Planet. Sci., Nagoya Univ.
Lines: 46
Message-ID: <58g2p5$9a4@news.cc.nagoya-u.ac.jp>
References: <58cd6g$c9m@soda.CSUA.Berkeley.EDU>
NNTP-Posting-Host: marble.eps.nagoya-u.ac.jp
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
X-Newsreader: mnews [version 1.19PL2] 1996-01/26(Fri)

In article <58cd6g$c9m@soda.CSUA.Berkeley.EDU>
	 <mconst@soda.CSUA.Berkeley.EDU>wrote:
> 
> npx0: error reporting broken; using 387 emulator
> 
> The emulator works fine, but I'm curious if this is some known bug with
> older-revision 387s.  I didn't see any mention in npx.c of a known bug,
> and in fact it mentions that the npx code was tested on a Cyrix 387 (and
> presumably worked).

This happens also on some Cyrix 486 box and Cyrix 5x86 with `faster
fpu exception' flag (undocumented).


Please try a patch bellow.  The patch is produced from npx.c in
FreeBSD 2.1.5 RELEASE.

---------- BEGIN ----------
*** npx.c.orig	Mon Dec  9 12:52:32 1996
--- npx.c	Mon Dec  9 12:53:20 1996
***************
*** 290,295 ****
--- 290,304 ----
  			 */
  			control &= ~(1 << 2);	/* enable divide by 0 trap */
  			fldcw(&control);
+ #ifdef FPU_ERROR_BROKEN
+ 			/*
+ 			 * FPU error signal doesn't work on some CPU
+ 			 * accelerator board.
+ 			 */
+ 			npx_ex16 = 1;
+ 			dvp->id_irq = 0;
+ 			return (-1);
+ #endif
  			npx_traps_while_probing = npx_intrs_while_probing = 0;
  			fp_divide_by_0();
  			if (npx_traps_while_probing != 0) {
---------- END ----------


----
KATO Takenori <kato@eclogite.eps.nagoya-u.ac.jp>
Dept. Earth Planet. Sci., Nagoya Univ.,  Nagoya, 464-01, Japan
PGP public key: finger kato@eclogite.eps.nagoya-u.ac.jp