blob: 67c95f2022901fa7f8e25d197770426553280d1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
Author: Jürgen Buchmüller <pullmoll@t-online.de>
Summary: adaptations for musl
URL: https://github.com/void-linux/void-packages/blob/master/srcpkgs/ilmbase/patches/musl-_fpstate.patch
Upstream: No
----
--- a/IlmBase/IexMath/IexMathFpu.cpp
+++ b/IlmBase/IexMath/IexMathFpu.cpp
@@ -281,10 +281,18 @@
inline void
restoreControlRegs (const ucontext_t & ucon, bool clearExceptions)
{
+#if defined(__GLIBC__) || defined(__i386__)
setCw ((ucon.uc_mcontext.fpregs->cw & cwRestoreMask) | cwRestoreVal);
+#else
+ setCw ((ucon.uc_mcontext.fpregs->cwd & cwRestoreMask) | cwRestoreVal);
+#endif
_fpstate * kfp = reinterpret_cast<_fpstate *> (ucon.uc_mcontext.fpregs);
+#if defined(__GLIBC__) || defined(__i386__)
setMxcsr (kfp->magic == 0 ? kfp->mxcsr : 0, clearExceptions);
+#else
+ setMxcsr (kfp->mxcsr, clearExceptions);
+#endif
}
#endif
|