[Git][cmucl/cmucl][master] 21 commits: Switch to variable stack sizes for NetBSD.

Robert Swindells rswindells at common-lisp.net
Sat Oct 8 22:25:02 UTC 2016


Robert Swindells pushed to branch master at cmucl / cmucl


Commits:
b163b8a4 by Robert Swindells at 2012-02-22T22:54:26+00:00
Switch to variable stack sizes for NetBSD.

- - - - -
97b18c97 by Robert Swindells at 2012-02-22T22:56:34+00:00
Merge branch 'master' of ssh://common-lisp.net/var/git/projects/cmucl/cmucl

- - - - -
5b3bf800 by Robert Swindells at 2013-10-06T07:55:10+01:00
Merge branch 'master' of ssh://common-lisp.net/var/git/projects/cmucl/cmucl

- - - - -
1db1d735 by Robert Swindells at 2014-08-04T12:39:44+01:00
Merge branch 'master' of ssh://common-lisp.net/var/git/projects/cmucl/cmucl

- - - - -
7e594c78 by Robert Swindells at 2014-09-07T22:18:28+01:00
Merge branch 'master' of ssh://common-lisp.net/var/git/projects/cmucl/cmucl

- - - - -
42a8ace0 by Robert Swindells at 2015-05-10T00:26:34+01:00
Merge branch 'master' of ssh://common-lisp.net/cmucl/cmucl

- - - - -
6af62766 by Robert Swindells at 2015-09-19T14:09:03+01:00
Merge branch 'master' of ssh://common-lisp.net/cmucl/cmucl

- - - - -
a8088cf5 by Robert Swindells at 2015-10-06T21:30:02+01:00
Merge branch 'master' of ssh://common-lisp.net/cmucl/cmucl

- - - - -
357d4fbc by Robert Swindells at 2015-12-27T20:27:09+00:00
Merge branch 'master' of ssh://common-lisp.net/cmucl/cmucl

- - - - -
f09f967b by Robert Swindells at 2015-12-31T18:08:48+00:00
Merge branch 'master' of ssh://common-lisp.net/cmucl/cmucl

- - - - -
9ed4d527 by Robert Swindells at 2016-01-03T18:27:15+00:00
Set size of sysctl value.

- - - - -
7474c805 by Robert Swindells at 2016-01-03T18:29:02+00:00
Merge branch 'master' of ssh://common-lisp.net/cmucl/cmucl

- - - - -
a14f5fe1 by Robert Swindells at 2016-05-10T07:28:15+01:00
Merge branch 'master' of ssh://common-lisp.net/cmucl/cmucl

- - - - -
a6bfb424 by Robert Swindells at 2016-06-11T14:23:13+01:00
Merge branch 'master' of ssh://common-lisp.net/cmucl/cmucl

- - - - -
a813d59a by Robert Swindells at 2016-09-07T01:13:19+01:00
Merge branch 'master' of ssh://common-lisp.net/cmucl/cmucl

- - - - -
ccb0f031 by Robert Swindells at 2016-10-01T18:58:59+01:00
Merge branch 'master' of ssh://common-lisp.net/cmucl/cmucl

- - - - -
5fd0e4ed by Robert Swindells at 2016-10-01T19:45:50+01:00
Revert change, wrong branch.

- - - - -
19b642fb by Robert Swindells at 2016-10-01T19:47:47+01:00
Set size of sysctl(3) argument.

- - - - -
b3a49942 by Robert Swindells at 2016-10-01T19:49:20+01:00
Update to NetBSD-7 mcontext API.

- - - - -
241dccfc by Robert Swindells at 2016-10-08T23:23:00+01:00
Add description of changes for NetBSD.

- - - - -
74711909 by Robert Swindells at 2016-10-08T23:24:05+01:00
Merge branch 'master' of ssh://common-lisp.net/cmucl/cmucl

- - - - -


2 changed files:

- src/general-info/release-21b.txt
- src/lisp/NetBSD-os.c


Changes:

=====================================
src/general-info/release-21b.txt
=====================================
--- a/src/general-info/release-21b.txt
+++ b/src/general-info/release-21b.txt
@@ -57,6 +57,7 @@ New in this release:
       control stack are now mapped into memory wherever the OS wishes
       to place them instead of being mapped into a fixed location.
       This is indicated by new feature :relocatable-stacks.
+    * Building on NetBSD now requires version 7.0 or later.
 
   * ANSI compliance fixes:
     * PATHNAME-MATCH-P did not accept search-lists.


=====================================
src/lisp/NetBSD-os.c
=====================================
--- a/src/lisp/NetBSD-os.c
+++ b/src/lisp/NetBSD-os.c
@@ -27,6 +27,8 @@
 #include <sys/sysctl.h>
 #include <errno.h>
 
+#include <x86/fpu.h>
+
 #include "os.h"
 #include "arch.h"
 #include "globals.h"
@@ -133,19 +135,19 @@ os_sigcontext_fpu_modes(ucontext_t *scp)
 {
     unsigned int modes;
 
-    union savefpu *sv = (union savefpu *) &scp->uc_mcontext.__fpregs.__fp_reg_set;
-    struct env87 *env_87 = (struct env87 *) &sv->sv_87.sv_env;
-    struct envxmm *env_xmm = (struct envxmm *) &sv->sv_xmm.sv_env;
+    union savefpu *sv = &scp->uc_mcontext.__fpregs.__fp_reg_set;
+    struct save87 *env_87 = (struct save87 *) &sv->sv_87;
+    struct fxsave *env_xmm = (struct fxsave *) &sv->sv_xmm;
     u_int16_t cw;
     u_int16_t sw;
 
     if (scp->uc_flags & _UC_FPU) {
 	if (scp->uc_flags & _UC_FXSAVE) {
-	    cw = env_xmm->en_cw;
-	    sw = env_xmm->en_sw;
+	    cw = env_xmm->fx_cw;
+	    sw = env_xmm->fx_sw;
 	} else {
-	    cw = env_87->en_cw & 0xffff;
-	    sw = env_87->en_sw & 0xffff;
+	    cw = env_87->s87_cw & 0xffff;
+	    sw = env_87->s87_sw & 0xffff;
 	}
     } else {
 	cw = 0;
@@ -156,7 +158,7 @@ os_sigcontext_fpu_modes(ucontext_t *scp)
 
 #ifdef FEATURE_SSE2
     if (fpu_mode == SSE2) {
-	u_int32_t mxcsr = env_xmm->en_mxcsr;
+	u_int32_t mxcsr = env_xmm->fx_mxcsr;
 
 	DPRINTF(0, (stderr, "SSE2 modes = %08x\n", (int)mxcsr));
 	modes |= mxcsr;
@@ -347,9 +349,9 @@ sigfpe_handler(HANDLER_ARGS)
     }
 
     if (ucontext->uc_flags & _UC_FXSAVE) {
-	sv->sv_xmm.sv_env.en_sw |= trap;
+	sv->sv_xmm.fx_sw |= trap;
     } else {
-	sv->sv_87.sv_env.en_sw |= trap;
+	sv->sv_87.s87_sw |= trap;
     }
     interrupt_handle_now(signal, code, context);
 }
@@ -385,16 +387,16 @@ os_dlsym(const char *sym_name, lispobj lib_list)
 void
 restore_fpu(ucontext_t *scp)
 {
-    union savefpu *sv = (union savefpu *) &scp->uc_mcontext.__fpregs.__fp_reg_set;
-    struct env87 *env_87 = &sv->sv_87.sv_env;
-    struct envxmm *env_xmm = &sv->sv_xmm.sv_env;
+    union savefpu *sv = &scp->uc_mcontext.__fpregs.__fp_reg_set;
+    struct save87 *env_87 = (struct save87 *) &sv->sv_87;
+    struct fxsave *env_xmm = (struct fxsave *) &sv->sv_xmm;
     u_int16_t cw;
 
     if (scp->uc_flags & _UC_FPU) {
 	if (scp->uc_flags & _UC_FXSAVE) {
-	    cw = env_xmm->en_cw;
+	    cw = env_xmm->fx_cw;
 	} else {
-	    cw = env_87->en_cw & 0xffff;
+	    cw = env_87->s87_cw & 0xffff;
 	}
     } else {
 	return;
@@ -403,7 +405,7 @@ restore_fpu(ucontext_t *scp)
     __asm__ __volatile__ ("fldcw %0"::"m"(*&cw));
 
     if (fpu_mode == SSE2) {
-	u_int32_t mxcsr = env_xmm->en_mxcsr;
+	u_int32_t mxcsr = env_xmm->fx_mxcsr;
 
 	DPRINTF(0, (stderr, "restore_fpu:  mxcsr (raw) = %04x\n", mxcsr));
 	__asm__ __volatile__ ("ldmxcsr %0"::"m"(*&mxcsr));
@@ -417,6 +419,7 @@ os_support_sse2()
     int support_sse2;
     size_t len;
 
+    len = sizeof(size_t);
     if (sysctlbyname("machdep.sse2", &support_sse2, &len,
 		     NULL, 0) == 0 && support_sse2 != 0)
 	return TRUE;



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/b55981380a3ce59d860be724e93de633a161fff1...74711909293e863efab3f2bf87a0e256b8bd863f
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20161008/b1ef2b2a/attachment-0001.html>


More information about the cmucl-cvs mailing list