x87 fstsw and fstcw instructions trigger pending x87 exception.
So use non-waiting fnstsw and fnstcw variants of those instructions which
let pending x87 exception untouched and unprocessed.
---
mingw-w64-crt/misc/mingw_setfp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-crt/misc/mingw_setfp.c b/mingw-w64-crt/misc/mingw_setfp.c
index 14fda6e24881..fb03781292ce 100644
--- a/mingw-w64-crt/misc/mingw_setfp.c
+++ b/mingw-w64-crt/misc/mingw_setfp.c
@@ -127,7 +127,7 @@ void __mingw_setfp( unsigned int *cw, unsigned int cw_mask,
if (sw)
{
- __asm__ __volatile__( "fstsw %0" : "=m" (newsw) );
+ __asm__ __volatile__( "fnstsw %0" : "=m" (newsw) );
oldsw = newsw;
flags = 0;
@@ -151,7 +151,7 @@ void __mingw_setfp( unsigned int *cw, unsigned int cw_mask,
if (cw)
{
- __asm__ __volatile__( "fstcw %0" : "=m" (newcw) );
+ __asm__ __volatile__( "fnstcw %0" : "=m" (newcw) );
oldcw = newcw;
flags = 0;
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public