[cmucl-commit] CMUCL commit: cross-sol-x86-branch src/lisp (solaris-os.c)

Raymond Toy rtoy at common-lisp.net
Mon Dec 20 23:11:53 CET 2010


    Date: Monday, December 20, 2010 @ 17:11:53
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/lisp
     Tag: cross-sol-x86-branch

Modified: solaris-os.c

o Fix a compiler warning.
o Get the correct data from the x87 FPU state for the control and
  status words.  Unfortunately, it looks as if Solaris/x86 doesn't
  save the x87 state in the sigcontext.


--------------+
 solaris-os.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)


Index: src/lisp/solaris-os.c
diff -u src/lisp/solaris-os.c:1.26.4.5 src/lisp/solaris-os.c:1.26.4.6
--- src/lisp/solaris-os.c:1.26.4.5	Mon Dec 20 10:12:26 2010
+++ src/lisp/solaris-os.c	Mon Dec 20 17:11:52 2010
@@ -1,5 +1,5 @@
 /*
- * $Header: /project/cmucl/cvsroot/src/lisp/solaris-os.c,v 1.26.4.5 2010-12-20 15:12:26 rtoy Exp $
+ * $Header: /project/cmucl/cvsroot/src/lisp/solaris-os.c,v 1.26.4.6 2010-12-20 22:11:52 rtoy Exp $
  *
  * OS-dependent routines.  This file (along with os.h) exports an
  * OS-independent interface to the operating system VM facilities.
@@ -566,7 +566,7 @@
     }
 #ifdef FEATURE_SSE2
     else {
-        reg = &fpregs->fp_reg_set.fpchip_state.xmm[offset - 8];
+        reg = (unsigned char*) &fpregs->fp_reg_set.fpchip_state.xmm[offset - 8];
     }
 #endif
 
@@ -583,13 +583,15 @@
         
     fpr = &scp->uc_mcontext.fpregs;
 
-    state = fpr->fp_reg_set.fpchip_state.state[0];
-        
-    cw = state & 0xffff;
-    sw = (state >> 16) & 0xffff;
+    cw = fpr->fp_reg_set.fpchip_state.state[0] & 0xffff;
+    sw = fpr->fp_reg_set.fpchip_state.state[1] & 0xffff;
 
     modes = ((cw & 0x3f) << 7) | (sw & 0x3f);
 
+    DPRINTF(0, (stderr, "cw = 0x%04x\n", cw));
+    DPRINTF(0, (stderr, "sw = 0x%04x\n", sw));
+    DPRINTF(0, (stderr, "modes = 0x%08x\n", modes));
+    
 #ifdef FEATURE_SSE2
     /*
      * Add in the SSE2 part, if we're running the sse2 core.


More information about the cmucl-commit mailing list