summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
index f4ae0f6..77a8847 100644
--- a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
+++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
@@ -47,7 +47,24 @@
47//--------------------------------------- 47//---------------------------------------
48void asm_finit() { 48void asm_finit() {
49#ifdef i386 49#ifdef i386
50 asm("finit"); 50
51 #if FPUDEBUG
52 uint val=0;
53 asm("fstsw"
54 : "=a" (val)
55 : "a" (val)
56 );
57
58 val = (val%16384)/2048; // bits 13-11
59
60 if (val != 0) {
61 printf("Warning: FPU Stack: %d\n",val);
62 asm("finit");
63 }
64 #else
65 asm("finit");
66 #endif
67
51#endif 68#endif
52} 69}
53//--------------------------------------- 70//---------------------------------------