mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
ntdll: Fix inverted floating point masks on ARM64EC.
This commit is contained in:
parent
b236ce5764
commit
be77f0c83f
1 changed files with 20 additions and 20 deletions
|
@ -83,16 +83,16 @@ static inline UINT64 mxcsr_to_fpcsr( UINT mxcsr )
|
|||
if (mxcsr & 0x0010) fpsr |= 0x0008; /* underflow */
|
||||
if (mxcsr & 0x0020) fpsr |= 0x0010; /* precision */
|
||||
|
||||
if (mxcsr & 0x0040) fpcr |= 0x0001; /* denormals are zero */
|
||||
if (mxcsr & 0x0080) fpcr |= 0x0100; /* invalid operation mask */
|
||||
if (mxcsr & 0x0100) fpcr |= 0x8000; /* denormal mask */
|
||||
if (mxcsr & 0x0200) fpcr |= 0x0200; /* zero-divide mask */
|
||||
if (mxcsr & 0x0400) fpcr |= 0x0400; /* overflow mask */
|
||||
if (mxcsr & 0x0800) fpcr |= 0x0800; /* underflow mask */
|
||||
if (mxcsr & 0x1000) fpcr |= 0x1000; /* precision mask */
|
||||
if (mxcsr & 0x2000) fpcr |= 0x800000; /* round down */
|
||||
if (mxcsr & 0x4000) fpcr |= 0x400000; /* round up */
|
||||
if (mxcsr & 0x8000) fpcr |= 0x1000000; /* flush to zero */
|
||||
if (mxcsr & 0x0040) fpcr |= 0x80000; /* denormals are zero */
|
||||
if (!(mxcsr & 0x0080)) fpcr |= 0x0100; /* invalid operation mask */
|
||||
if (!(mxcsr & 0x0100)) fpcr |= 0x8000; /* denormal mask */
|
||||
if (!(mxcsr & 0x0200)) fpcr |= 0x0200; /* zero-divide mask */
|
||||
if (!(mxcsr & 0x0400)) fpcr |= 0x0400; /* overflow mask */
|
||||
if (!(mxcsr & 0x0800)) fpcr |= 0x0800; /* underflow mask */
|
||||
if (!(mxcsr & 0x1000)) fpcr |= 0x1000; /* precision mask */
|
||||
if (mxcsr & 0x2000) fpcr |= 0x800000; /* round down */
|
||||
if (mxcsr & 0x4000) fpcr |= 0x400000; /* round up */
|
||||
if (mxcsr & 0x8000) fpcr |= 0x1000000; /* flush to zero */
|
||||
return fpcr | ((UINT64)fpsr << 32);
|
||||
}
|
||||
|
||||
|
@ -107,16 +107,16 @@ static inline UINT fpcsr_to_mxcsr( UINT fpcr, UINT fpsr )
|
|||
if (fpsr & 0x0010) ret |= 0x0020; /* precision */
|
||||
if (fpsr & 0x0080) ret |= 0x0002; /* denormal */
|
||||
|
||||
if (fpcr & 0x0000001) ret |= 0x0040; /* denormals are zero */
|
||||
if (fpcr & 0x0000100) ret |= 0x0080; /* invalid operation mask */
|
||||
if (fpcr & 0x0000200) ret |= 0x0200; /* zero-divide mask */
|
||||
if (fpcr & 0x0000400) ret |= 0x0400; /* overflow mask */
|
||||
if (fpcr & 0x0000800) ret |= 0x0800; /* underflow mask */
|
||||
if (fpcr & 0x0001000) ret |= 0x1000; /* precision mask */
|
||||
if (fpcr & 0x0008000) ret |= 0x0100; /* denormal mask */
|
||||
if (fpcr & 0x0400000) ret |= 0x4000; /* round up */
|
||||
if (fpcr & 0x0800000) ret |= 0x2000; /* round down */
|
||||
if (fpcr & 0x1000000) ret |= 0x8000; /* flush to zero */
|
||||
if (fpcr & 0x0080000) ret |= 0x0040; /* denormals are zero */
|
||||
if (!(fpcr & 0x0000100)) ret |= 0x0080; /* invalid operation mask */
|
||||
if (!(fpcr & 0x0000200)) ret |= 0x0200; /* zero-divide mask */
|
||||
if (!(fpcr & 0x0000400)) ret |= 0x0400; /* overflow mask */
|
||||
if (!(fpcr & 0x0000800)) ret |= 0x0800; /* underflow mask */
|
||||
if (!(fpcr & 0x0001000)) ret |= 0x1000; /* precision mask */
|
||||
if (!(fpcr & 0x0008000)) ret |= 0x0100; /* denormal mask */
|
||||
if (fpcr & 0x0400000) ret |= 0x4000; /* round up */
|
||||
if (fpcr & 0x0800000) ret |= 0x2000; /* round down */
|
||||
if (fpcr & 0x1000000) ret |= 0x8000; /* flush to zero */
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue