Commit 62d26937 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Fix x87 FPU status register assignment detection.

parent 2cc98b72
......@@ -35,6 +35,7 @@
* ====================================================
*/
#include <assert.h>
#include <complex.h>
#include <stdio.h>
#include <fenv.h>
......@@ -5321,7 +5322,7 @@ static BOOL _setfp( unsigned int *cw, unsigned int cw_mask,
if (*cw & _IC_AFFINE) newcw |= 0x1000;
}
if (oldsw != newsw && newsw)
if (oldsw != newsw && (newsw & 0x3f))
{
struct {
WORD control_word;
......@@ -5338,6 +5339,8 @@ static BOOL _setfp( unsigned int *cw, unsigned int cw_mask,
WORD unused5;
} fenv;
assert(cw);
__asm__ __volatile__( "fnstenv %0" : "=m" (fenv) );
fenv.control_word = newcw;
fenv.status_word = newsw;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment