From owner-freebsd-current Mon Aug 31 18:33:56 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA23101 for freebsd-current-outgoing; Mon, 31 Aug 1998 18:33:56 -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 SAA23078 for ; Mon, 31 Aug 1998 18:33:49 -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 LAA14077; Tue, 1 Sep 1998 11:32:44 +1000 Date: Tue, 1 Sep 1998 11:32:44 +1000 From: Bruce Evans Message-Id: <199809010132.LAA14077@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 >OK, I had another look and Linux and Solaris both have >#define FPE_INTDIV 1 /* integer divide by zero */ >#define FPE_INTOVF 2 /* integer overflow */ >#define FPE_FLTDIV 3 /* floating point divide by zero */ >#define FPE_FLTOVF 4 /* floating point overflow */ >#define FPE_FLTUND 5 /* floating point underflow */ >#define FPE_FLTRES 6 /* floating point inexact result */ >#define FPE_FLTINV 7 /* invalid floating point operation */ >#define FPE_FLTSUB 8 /* subscript out of range */ > >I think that's the way to go for the code to pass as the second >argument to the signal handler. Yes. Add FPE_FLTSTK (floating point stack overflow). is missing this too. Delete FPE_FLTSUB (does it mean bounds check exception? In any case, it shouldn't have FLT in its name). Add FPE_FLT_DNM[L] (floating point denormal operand). Actually, I prefer the current naming scheme, and glibc uses one close to it, at least in its manual: FPE_INTOVF_TRAP this and following ones have same name as ours FPE_INTDIV_TRAP FPE_SUBRNG_TRAP FPE_FLTOVF_TRAP FPE_FLTDIV_TRAP FPE_FLTUND_TRAP FPE_FLTDECOVF_TRAP floating point decimal overflow trap [same names with s/TRAP/FAULT/] That's about all in the manual :(. Then, apparently for hurd only: FPE_FLTDNR_FAULT denormalized (sic) operand FPE_FLTINX_FAULT ... loss of precision Still not complete. >Which header file should I put the FPE_...... macros in? Should I >replace the FPE_......_TRAP macros in trap.h? That way, I can add our >FPE_FPU_NP_TRAP to the set above. . It's included by and is almost free of pollution. FPE_FPU_NP_TRAP won't happen in practice. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message