summaryrefslogtreecommitdiff
path: root/libs/pbd/fpu.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-12-26 22:32:21 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-12-26 22:32:21 +0000
commita556546291a86d3feae64a7a010d0756d5119f6b (patch)
treea1d84e0cd5930447138e651a4efb695090260241 /libs/pbd/fpu.cc
parent5f88b44245a91771dac888d2c0df0fc99aab06f7 (diff)
explain MXCSR shenanigans in libs/pbd/fpu.cc
git-svn-id: svn://localhost/ardour2/branches/3.0@11079 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/fpu.cc')
-rw-r--r--libs/pbd/fpu.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/pbd/fpu.cc b/libs/pbd/fpu.cc
index 1018414d9b..7efc63715b 100644
--- a/libs/pbd/fpu.cc
+++ b/libs/pbd/fpu.cc
@@ -69,6 +69,16 @@ FPU::FPU ()
char* fxbuf = 0;
+ /* DAZ wasn't available in the first version of SSE. Since
+ setting a reserved bit in MXCSR causes a general protection
+ fault, we need to be able to check the availability of this
+ feature without causing problems. To do this, one needs to
+ set up a 512-byte area of memory to save the SSE state to,
+ using fxsave, and then one needs to inspect bytes 28 through
+ 31 for the MXCSR_MASK value. If bit 6 is set, DAZ is
+ supported, otherwise, it isn't.
+ */
+
#ifdef NO_POSIX_MEMALIGN
if ((fxbuf = (char *) malloc(512)) == 0)
#else