Date: Wed, 18 Jul 2012 01:27:29 +1000 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Bruce Evans <brde@optusnet.com.au> Cc: freebsd-amd64@FreeBSD.org Subject: Re: amd64/169927: siginfo, si_code for fpe errors when error occurs using the SSE math processor Message-ID: <20120718011942.D7642@besplex.bde.org> In-Reply-To: <20120717235622.C7417@besplex.bde.org> References: <201207171350.q6HDoAJS033797@freefall.freebsd.org> <20120717235622.C7417@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 18 Jul 2012, Bruce Evans wrote: > On Tue, 17 Jul 2012, Konstantin Belousov wrote: >> ... >> + status =3D mxcsr & 0x3f; >> + control =3D (mxcsr >> 16) & 0x3f; >> + return (fpetable[status & (~control | 0x40)]); > > The 0x40 bit doesn't exist in the mxcsr status and ORing it in here has > no effect. Replace the last 3 lines by: > > return (fpetable[(status & (control >> 16)) & 0x3f]; Change status and control to mxcsr here, and remove the status and control variables. > .. > So I still want a single kernel exception handle that merges the statuses. Merge the independent statuses modified by their independent controls: return (fpetable[(fpsw & ((~fpcw & 0x3f) | 0x40)) | ((mxcsr & (mxcsr >> 16)) & 0x3f)]); Use the same trap handler that reads all these statuses and controls. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120718011942.D7642>