mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 03:03:37 +00:00
Make FPU exception dispatching work (more?) properly.
svn path=/trunk/; revision=57279
This commit is contained in:
parent
858cfa0dbb
commit
e46fb748a9
1 changed files with 21 additions and 17 deletions
|
@ -297,8 +297,9 @@ KiNpxHandler(IN PKTRAP_FRAME TrapFrame,
|
|||
}
|
||||
|
||||
/* Get legal exceptions that software should handle */
|
||||
Error &= (FSW_STACK_FAULT |
|
||||
FSW_INVALID_OPERATION |
|
||||
/* We do this by first masking off from the Mask the bits we need, */
|
||||
/* This is done so we can keep the FSW_STACK_FAULT bit in Error. */
|
||||
Mask &= (FSW_INVALID_OPERATION |
|
||||
FSW_DENORMAL |
|
||||
FSW_ZERO_DIVIDE |
|
||||
FSW_OVERFLOW |
|
||||
|
@ -306,6 +307,12 @@ KiNpxHandler(IN PKTRAP_FRAME TrapFrame,
|
|||
FSW_PRECISION);
|
||||
Error &= ~Mask;
|
||||
|
||||
/* Check for invalid operation */
|
||||
if (Error & FSW_INVALID_OPERATION)
|
||||
{
|
||||
/* NOTE: Stack fault is handled differently than any other case. */
|
||||
/* 1. It's only raised for invalid operation. */
|
||||
/* 2. It's only raised if invalid operation is not masked. */
|
||||
if (Error & FSW_STACK_FAULT)
|
||||
{
|
||||
/* Issue stack check fault */
|
||||
|
@ -316,9 +323,6 @@ KiNpxHandler(IN PKTRAP_FRAME TrapFrame,
|
|||
TrapFrame);
|
||||
}
|
||||
|
||||
/* Check for invalid operation */
|
||||
if (Error & FSW_INVALID_OPERATION)
|
||||
{
|
||||
/* Issue fault */
|
||||
KiDispatchException1Args(STATUS_FLOAT_INVALID_OPERATION,
|
||||
ErrorOffset,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue