From owner-freebsd-current Mon Aug 31 07:01:28 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA23775 for freebsd-current-outgoing; Mon, 31 Aug 1998 07:01:28 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA23770 for ; Mon, 31 Aug 1998 07:01:25 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id AAA03763; Tue, 1 Sep 1998 00:00:19 +1000 Date: Tue, 1 Sep 1998 00:00:19 +1000 From: Bruce Evans Message-Id: <199808311400.AAA03763@godzilla.zeta.org.au> To: bde@zeta.org.au, cracauer@cons.org, current@FreeBSD.ORG Subject: Re: Floating Point Exceptions, signal handlers & subsequent ops Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> >> code = translation_table[ffs(status_word & control_word & 0x3F)]; >> > >> >But the values of the symbols the application tests against >> >("FP_X_...") are chosen so that no translation is needed. >> >> Sorry, I thought that you didn't change the codes that much. > >I didn't. The FP_X_ value have always been the hardware bit >values. They are on Solaris (SPARC and x86) as well, so I thought >people agreed to use the hardware bit values to make the kernel code >more efficient. I thought Sun normally uses machine-independent codes like our FPE_*. >> >npx.c:npxintr() ? >> >> Just translate the code there. You do need to store the control word >> somewhere. > >Store it for use outside of npxintr()? Why that? Outside of the CFU 8-). >If I implement XXX_ENCODE, I get the trap code I want and have no need >for the control word (or the status word, for that matter) outside >this function. There's no trap code except possibly for one generated from the FPU state. XXX_ENCODE currently takes only the status word as an arg. Your idea of throwing away the masked bits is good. I think the point of FPE_* is that that they give a simple semi-portable interface for applications that don't want to know about the status word, the control word and where they may be found. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message