summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2011-03-12 13:07:30 +0000
committerAlberto Ruiz <aruiz@um.es>2011-03-12 13:07:30 +0000
commitf73c151f536aa81875285ccb38adc309d01b5915 (patch)
treed3d77eb5a658c9986fbd5fa0e638004b68b2cccf /lib/Numeric/LinearAlgebra
parenteb5181b401743c34599073e8adb6bf34a897a3bc (diff)
fpudebug
Diffstat (limited to 'lib/Numeric/LinearAlgebra')
-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//---------------------------------------