amd64/169927: siginfo, si_code for fpe errors when error occurs
using the SSE math processor
Bruce Evans
brde at optusnet.com.au
Tue Jul 17 15:27:38 UTC 2012
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
More information about the freebsd-amd64
mailing list