diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2018-02-17 15:40:49 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2018-02-17 15:40:49 +0000 |
commit | d4262554496d66dc1d50d61d8562da12a3eaec73 (patch) | |
tree | 3ea9ff494d2225b22082450c9b4fd55ee954e24b /rtl/win32 | |
parent | 52b1e6d5a21f956a682458a40cb5ab7d8616944b (diff) | |
download | fpc-d4262554496d66dc1d50d61d8562da12a3eaec73.tar.gz |
* fixed TranslateMxcsr
+ correctly handle sse exceptions on i386, resolves #32671
+ test
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@38268 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/win32')
-rw-r--r-- | rtl/win32/system.pp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rtl/win32/system.pp b/rtl/win32/system.pp index f919619dd6..bb85f9b450 100644 --- a/rtl/win32/system.pp +++ b/rtl/win32/system.pp @@ -424,7 +424,7 @@ procedure JumpToHandleErrorFrame; function syswin32_i386_exception_handler(excep : PExceptionPointers) : Longint;stdcall; var - res: longint; + res,ssecode: longint; err: byte; must_reset_fpu: boolean; begin @@ -495,6 +495,16 @@ function syswin32_i386_exception_handler(excep : PExceptionPointers) : Longint;s err := 218; must_reset_fpu := false; end; + STATUS_FLOAT_MULTIPLE_TRAPS: + begin + { dumping ExtendedRegisters and comparing with the actually value of mxcsr revealed 24 } + TranslateMxcsr(excep^.ContextRecord^.ExtendedRegisters[24],ssecode); +{$ifdef SYSTEMEXCEPTIONDEBUG} + if IsConsole then + Writeln(stderr,'MXSR: ',hexstr(excep^.ContextRecord^.ExtendedRegisters[24], 2),' SSECODE: ',ssecode); +{$endif SYSTEMEXCEPTIONDEBUG} + err:=-ssecode; + end; else begin if ((excep^.ExceptionRecord^.ExceptionCode and SEVERITY_ERROR) = SEVERITY_ERROR) then |