[Openmcl-cvs-notifications] r13638 - in /trunk/source/lisp-kernel: ./ darwinppc/ darwinppc64/ darwinx8632/ darwinx8664/ linuxppc/ linuxppc64/ linuxx8632/ linuxx8664/ solarisx64/ solarisx86/ win32/ win64/
gb at clozure.com
gb at clozure.com
Sun Apr 18 11:58:15 UTC 2010
Author: gb
Date: Sun Apr 18 05:58:15 2010
New Revision: 13638
Log:
Move more PPC exception stuff, x86 exception stuff to platform heeaders.
Introduce OS headers; so far, just signal constants. Include the applicable
os-*.h in platform-*.h.
Ensure that Makefiles have constants.h, os*.h in CHEADERS.
Will try to smoke-test & fix typos before sleeping.
Added:
trunk/source/lisp-kernel/os-darwin.h
trunk/source/lisp-kernel/os-freebsd.h
trunk/source/lisp-kernel/os-linux.h
trunk/source/lisp-kernel/os-solaris.h
trunk/source/lisp-kernel/os-windows.h
Modified:
trunk/source/lisp-kernel/Threads.h
trunk/source/lisp-kernel/darwinppc/Makefile
trunk/source/lisp-kernel/darwinppc64/Makefile
trunk/source/lisp-kernel/darwinx8632/Makefile
trunk/source/lisp-kernel/darwinx8664/Makefile
trunk/source/lisp-kernel/linuxppc/Makefile
trunk/source/lisp-kernel/linuxppc64/Makefile
trunk/source/lisp-kernel/linuxx8632/Makefile
trunk/source/lisp-kernel/linuxx8664/Makefile
trunk/source/lisp-kernel/platform-darwinppc.h
trunk/source/lisp-kernel/platform-darwinppc64.h
trunk/source/lisp-kernel/platform-darwinx8632.h
trunk/source/lisp-kernel/platform-darwinx8664.h
trunk/source/lisp-kernel/platform-freebsdx8632.h
trunk/source/lisp-kernel/platform-freebsdx8664.h
trunk/source/lisp-kernel/platform-linuxppc.h
trunk/source/lisp-kernel/platform-linuxppc64.h
trunk/source/lisp-kernel/platform-linuxx8632.h
trunk/source/lisp-kernel/platform-linuxx8664.h
trunk/source/lisp-kernel/platform-solarisx64.h
trunk/source/lisp-kernel/platform-solarisx86.h
trunk/source/lisp-kernel/platform-win32.h
trunk/source/lisp-kernel/platform-win64.h
trunk/source/lisp-kernel/solarisx64/Makefile
trunk/source/lisp-kernel/solarisx86/Makefile
trunk/source/lisp-kernel/win32/Makefile
trunk/source/lisp-kernel/win64/Makefile
trunk/source/lisp-kernel/x86-exceptions.h
Modified: trunk/source/lisp-kernel/Threads.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/Threads.h (original)
+++ trunk/source/lisp-kernel/Threads.h Sun Apr 18 05:58:15 2010
@@ -234,29 +234,6 @@
#define CLR_TCR_FLAG(t,bit) atomic_and(&(t->flags),~(1L<<bit))
=
=
-#if defined(SIGRTMIN) && !defined(SOLARIS)
-#define SIG_SUSPEND_THREAD (SIGRTMIN+6)
-#else
-#define SIG_SUSPEND_THREAD SIGUSR2
-#endif
-
-
-#ifdef DARWIN
-#define SIG_KILL_THREAD SIGEMT
-#endif
-
-#if defined(LINUX) && defined(SIGRTMIN)
-#define SIG_KILL_THREAD (SIGRTMIN+7)
-#endif
-
-#ifdef SOLARIS
-#define SIG_KILL_THREAD SIGRTMIN
-#endif
-
-#ifdef FREEBSD
-#define SIG_KILL_THREAD (SIGTHR+5)
-#endif
-
=
extern int thread_suspend_signal, thread_kill_signal;
=
Modified: trunk/source/lisp-kernel/darwinppc/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/darwinppc/Makefile (original)
+++ trunk/source/lisp-kernel/darwinppc/Makefile Sun Apr 18 05:58:15 2010
@@ -50,7 +50,8 @@
=
CHEADERS =3D area.h bits.h ppc-constants.h lisp-errors.h gc.h lisp.h \
lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
- Threads.h lisptypes.h ppc-constants32.h ppc-exceptions.h $(PLATFORM_H)
+ Threads.h lisptypes.h ppc-constants32.h ppc-exceptions.h \
+ $(PLATFORM_H) constants.h os-darwin.h
=
# Subprims linked into the kernel ?
# Yes:
Modified: trunk/source/lisp-kernel/darwinppc64/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/darwinppc64/Makefile (original)
+++ trunk/source/lisp-kernel/darwinppc64/Makefile Sun Apr 18 05:58:15 2010
@@ -58,7 +58,8 @@
=
CHEADERS =3D area.h bits.h ppc-constants.h lisp-errors.h gc.h lisp.h \
lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
- Threads.h lisptypes.h ppc-constants64.h ppc-exceptions.h $(PLATFORM_H)
+ Threads.h lisptypes.h ppc-constants64.h ppc-exceptions.h \
+ $(PLATFORM_H) constants.h os-darwin.h
=
# Subprims linked into the kernel ?
# Yes:
Modified: trunk/source/lisp-kernel/darwinx8632/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/darwinx8632/Makefile (original)
+++ trunk/source/lisp-kernel/darwinx8632/Makefile Sun Apr 18 05:58:15 2010
@@ -52,8 +52,8 @@
=
CHEADERS =3D area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
- Threads.h lisptypes.h x86-constants32.h x86-exceptions.h $(PLATFORM_H) \
- constants.h
+ Threads.h lisptypes.h x86-constants32.h x86-exceptions.h \
+ $(PLATFORM_H) constants.h os-darwin.h
=
# Subprims linked into the kernel ?
# Yes:
Modified: trunk/source/lisp-kernel/darwinx8664/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/darwinx8664/Makefile (original)
+++ trunk/source/lisp-kernel/darwinx8664/Makefile Sun Apr 18 05:58:15 2010
@@ -75,8 +75,8 @@
=
CHEADERS =3D area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
- Threads.h lisptypes.h x86-constants64.h x86-exceptions.h $(PLATFORM_H) \
- constants.h
+ Threads.h lisptypes.h x86-constants64.h x86-exceptions.h \
+ $(PLATFORM_H) constants.h os-darwin.h
=
# Subprims linked into the kernel ?
# Yes:
Modified: trunk/source/lisp-kernel/linuxppc/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/linuxppc/Makefile (original)
+++ trunk/source/lisp-kernel/linuxppc/Makefile Sun Apr 18 05:58:15 2010
@@ -71,7 +71,8 @@
=
CHEADERS =3D area.h bits.h ppc-constants.h lisp-errors.h gc.h lisp.h \
lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
- Threads.h ppc-constants32.h ppc-exceptions.h $(PLATFORM_H)
+ Threads.h ppc-constants32.h ppc-exceptions.h $(PLATFORM_H) \
+ constants.h os-linux.h
=
# Subprims linked into the kernel ?
# Yes:
Modified: trunk/source/lisp-kernel/linuxppc64/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/linuxppc64/Makefile (original)
+++ trunk/source/lisp-kernel/linuxppc64/Makefile Sun Apr 18 05:58:15 2010
@@ -59,7 +59,8 @@
=
CHEADERS =3D area.h bits.h ppc-constants.h lisp-errors.h gc.h lisp.h \
lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
- Threads.h ppc-constants64.h ppc-exceptions.h $(PLATFORM_H)
+ Threads.h ppc-constants64.h ppc-exceptions.h $(PLATFORM_H) \
+ constants.h os-linux.h
=
# Subprims linked into the kernel ?
# Yes:
Modified: trunk/source/lisp-kernel/linuxx8632/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/linuxx8632/Makefile (original)
+++ trunk/source/lisp-kernel/linuxx8632/Makefile Sun Apr 18 05:58:15 2010
@@ -58,7 +58,8 @@
=
CHEADERS =3D area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
- Threads.h x86-constants32.h x86-exceptions.h lisptypes.h $(PLATFORM_H)
+ Threads.h x86-constants32.h x86-exceptions.h lisptypes.h \
+ $(PLATFORM_H) constants.h os-linux.h
=
=
KSPOBJ =3D $(SPOBJ)
Modified: trunk/source/lisp-kernel/linuxx8664/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/linuxx8664/Makefile (original)
+++ trunk/source/lisp-kernel/linuxx8664/Makefile Sun Apr 18 05:58:15 2010
@@ -58,7 +58,8 @@
=
CHEADERS =3D area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
- Threads.h x86-constants64.h x86-exceptions.h lisptypes.h $(PLATFORM_H)
+ Threads.h x86-constants64.h x86-exceptions.h lisptypes.h \
+ $(PLATFORM_H) constants.h os-linux.h
=
=
KSPOBJ =3D $(SPOBJ)
Added: trunk/source/lisp-kernel/os-darwin.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/os-darwin.h (added)
+++ trunk/source/lisp-kernel/os-darwin.h Sun Apr 18 05:58:15 2010
@@ -1,0 +1,22 @@
+/*
+ Copyright (C) 2010 Clozure Associates
+ Copyright (C) 1994-2001 Digitool, Inc
+ This file is part of Clozure CL. =
+
+ Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
+ License , known as the LLGPL and distributed with Clozure CL as the
+ file "LICENSE". The LLGPL consists of a preamble and the LGPL,
+ which is distributed with Clozure CL as the file "LGPL". Where these
+ conflict, the preamble takes precedence. =
+
+ Clozure CL is referenced in the preamble as the "LIBRARY."
+
+ The LLGPL is also available online at
+ http://opensource.franz.com/preamble.html
+*/
+
+#define SIGNAL_FOR_PROCESS_INTERRUPT SIGUSR1
+
+#define SIG_SUSPEND_THREAD SIGUSR2
+
+#define SIG_KILL_THREAD SIGEMT
Added: trunk/source/lisp-kernel/os-freebsd.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/os-freebsd.h (added)
+++ trunk/source/lisp-kernel/os-freebsd.h Sun Apr 18 05:58:15 2010
@@ -1,0 +1,20 @@
+/*
+ Copyright (C) 2010 Clozure Associates
+ Copyright (C) 1994-2001 Digitool, Inc
+ This file is part of Clozure CL. =
+
+ Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
+ License , known as the LLGPL and distributed with Clozure CL as the
+ file "LICENSE". The LLGPL consists of a preamble and the LGPL,
+ which is distributed with Clozure CL as the file "LGPL". Where these
+ conflict, the preamble takes precedence. =
+
+ Clozure CL is referenced in the preamble as the "LIBRARY."
+
+ The LLGPL is also available online at
+ http://opensource.franz.com/preamble.html
+*/
+
+#define SIGNAL_FOR_PROCESS_INTERRUPT SIGEMT
+#define SIG_SUSPEND_THREAD SIGUSR2
+#define SIG_KILL_THREAD (SIGTHR+5)
Added: trunk/source/lisp-kernel/os-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/os-linux.h (added)
+++ trunk/source/lisp-kernel/os-linux.h Sun Apr 18 05:58:15 2010
@@ -1,0 +1,20 @@
+/*
+ Copyright (C) 2010 Clozure Associates
+ Copyright (C) 1994-2001 Digitool, Inc
+ This file is part of Clozure CL. =
+
+ Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
+ License , known as the LLGPL and distributed with Clozure CL as the
+ file "LICENSE". The LLGPL consists of a preamble and the LGPL,
+ which is distributed with Clozure CL as the file "LGPL". Where these
+ conflict, the preamble takes precedence. =
+
+ Clozure CL is referenced in the preamble as the "LIBRARY."
+
+ The LLGPL is also available online at
+ http://opensource.franz.com/preamble.html
+*/
+
+#define SIGNAL_FOR_PROCESS_INTERRUPT SIGPWR
+#define SIG_SUSPEND_THREAD (SIGRTMIN+6)
+#define SIG_KILL_THREAD (SIGRTMIN+7)
Added: trunk/source/lisp-kernel/os-solaris.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/os-solaris.h (added)
+++ trunk/source/lisp-kernel/os-solaris.h Sun Apr 18 05:58:15 2010
@@ -1,0 +1,20 @@
+/*
+ Copyright (C) 2010 Clozure Associates
+ Copyright (C) 1994-2001 Digitool, Inc
+ This file is part of Clozure CL. =
+
+ Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
+ License , known as the LLGPL and distributed with Clozure CL as the
+ file "LICENSE". The LLGPL consists of a preamble and the LGPL,
+ which is distributed with Clozure CL as the file "LGPL". Where these
+ conflict, the preamble takes precedence. =
+
+ Clozure CL is referenced in the preamble as the "LIBRARY."
+
+ The LLGPL is also available online at
+ http://opensource.franz.com/preamble.html
+*/
+
+#define SIGNAL_FOR_PROCESS_INTERRUPT SIGUSR1
+#define SIG_SUSPEND_THREAD SIGUSR2
+#define SIG_KILL_THREAD SIGRTMIN
Added: trunk/source/lisp-kernel/os-windows.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/os-windows.h (added)
+++ trunk/source/lisp-kernel/os-windows.h Sun Apr 18 05:58:15 2010
@@ -1,0 +1,29 @@
+/*
+ Copyright (C) 2010 Clozure Associates
+ Copyright (C) 1994-2001 Digitool, Inc
+ This file is part of Clozure CL. =
+
+ Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
+ License , known as the LLGPL and distributed with Clozure CL as the
+ file "LICENSE". The LLGPL consists of a preamble and the LGPL,
+ which is distributed with Clozure CL as the file "LGPL". Where these
+ conflict, the preamble takes precedence. =
+
+ Clozure CL is referenced in the preamble as the "LIBRARY."
+
+ The LLGPL is also available online at
+ http://opensource.franz.com/preamble.html
+*/
+
+#define SIGNAL_FOR_PROCESS_INTERRUPT SIGINT
+#ifndef SIGBUS
+#define SIGBUS 10
+#endif
+#ifndef CONTEXT_ALL
+#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS =
| CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS | CONTEXT_EXTENDED_REGIS=
TERS)
+#endif
+
+typedef struct {
+ HANDLE h;
+ OVERLAPPED *o;
+} pending_io;
Modified: trunk/source/lisp-kernel/platform-darwinppc.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-darwinppc.h (original)
+++ trunk/source/lisp-kernel/platform-darwinppc.h Sun Apr 18 05:58:15 2010
@@ -67,3 +67,4 @@
*/
#define SIGRETURN(context)
=
+#include "os-darwin.h"
Modified: trunk/source/lisp-kernel/platform-darwinppc64.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-darwinppc64.h (original)
+++ trunk/source/lisp-kernel/platform-darwinppc64.h Sun Apr 18 05:58:15 2010
@@ -67,3 +67,5 @@
restore context. On DarwinPPC, that's not a factor.
*/
#define SIGRETURN(context)
+
+#include "os-darwin.h"
Modified: trunk/source/lisp-kernel/platform-darwinx8632.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-darwinx8632.h (original)
+++ trunk/source/lisp-kernel/platform-darwinx8632.h Sun Apr 18 05:58:15 2010
@@ -35,3 +35,37 @@
=
#include "lisptypes.h"
#include "x86-constants32.h"
+
+
+/* xp accessors, sigreturn stuff */
+#define DARWIN_USE_PSEUDO_SIGRETURN 1
+#define DarwinSigReturn(context) do {\
+ darwin_sigreturn(context);\
+ Bug(context,"sigreturn returned");\
+ } while (0)
+
+#define xpGPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__ss)))
+#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
+#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) =3D (natural)(new)
+#define xpPC(x) (xpGPR(x,Iip))
+#define eflags_register(xp) xpGPR(xp,Iflags)
+#define xpFPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__fs.__fpu_xmm0)))
+#define xpMMXvector(x) (&(UC_MCONTEXT(x)->__fs.__fpu_stmm0))
+/* Note that this yields only the lower half of the MMX reg on x8632 */
+#define xpMMXreg(x,n) *(natural *)&(xpMMXvector(x)[n])
+
+#define SIGNUM_FOR_INTN_TRAP SIGSEGV /* Not really, but our Mach handler f=
akes that */
+#define IS_MAYBE_INT_TRAP(info,xp) ((UC_MCONTEXT(xp)->__es.__trapno =3D=3D=
0xd) && (((UC_MCONTEXT(xp)->__es.__err)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (UC_MCONTEXT(xp)->__es.__trapno =3D=3D 0xe)
+/* The x86 version of sigreturn just needs the context argument; the
+ hidden, magic "flavor" argument that sigtramp uses is ignored. */
+#define SIGRETURN(context) DarwinSigReturn(context)
+
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/machine/thread_state.h>
+#include <mach/machine/thread_status.h>
+
+pthread_mutex_t *mach_exception_lock;
+
+#include "os-darwin.h"
Modified: trunk/source/lisp-kernel/platform-darwinx8664.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-darwinx8664.h (original)
+++ trunk/source/lisp-kernel/platform-darwinx8664.h Sun Apr 18 05:58:15 2010
@@ -36,3 +36,35 @@
=
#include "lisptypes.h"
#include "x86-constants64.h"
+
+/* xp accessors, sigreturn stuff */
+#define DARWIN_USE_PSEUDO_SIGRETURN 1
+#define DarwinSigReturn(context) do {\
+ darwin_sigreturn(context);\
+ Bug(context,"sigreturn returned");\
+ } while (0)
+
+#define xpGPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__ss)))
+#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
+#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) =3D (natural)(new)
+#define xpPC(x) (xpGPR(x,Iip))
+#define eflags_register(xp) xpGPR(xp,Iflags)
+#define xpFPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__fs.__fpu_xmm0)))
+#define xpMMXvector(x) (&(UC_MCONTEXT(x)->__fs.__fpu_stmm0))
+/* Note that this yields only the lower half of the MMX reg on x8632 */
+#define xpMMXreg(x,n) *(natural *)&(xpMMXvector(x)[n])
+#define SIGNUM_FOR_INTN_TRAP SIGSEGV /* Not really, but our Mach handler f=
akes that */
+#define IS_MAYBE_INT_TRAP(info,xp) ((UC_MCONTEXT(xp)->__es.__trapno =3D=3D=
0xd) && (((UC_MCONTEXT(xp)->__es.__err)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (UC_MCONTEXT(xp)->__es.__trapno =3D=3D 0xe)
+/* The x86 version of sigreturn just needs the context argument; the
+ hidden, magic "flavor" argument that sigtramp uses is ignored. */
+#define SIGRETURN(context) DarwinSigReturn(context)
+
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/machine/thread_state.h>
+#include <mach/machine/thread_status.h>
+
+pthread_mutex_t *mach_exception_lock;
+
+#include "os-darwin.h"
Modified: trunk/source/lisp-kernel/platform-freebsdx8632.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-freebsdx8632.h (original)
+++ trunk/source/lisp-kernel/platform-freebsdx8632.h Sun Apr 18 05:58:15 20=
10
@@ -30,3 +30,19 @@
=
#include "lisptypes.h"
#include "x86-constants32.h"
+
+#include <machine/fpu.h>
+#define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext)))
+#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
+#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) =3D (natural)(new)
+#define eflags_register(xp) xpGPR(xp,Iflags)
+#define xpPC(x) xpGPR(x,Iip)
+#define xpMMXreg(x,n) *((natural *)(&(((struct ccl_savexmm *)(&(x)->uc_mco=
ntext.mc_fpstate))->sv_fp[n])))
+#define xpXMMregs(x)(&(((struct ccl_savexmm *)(&(x)->uc_mcontext.mc_fpstat=
e))->sv_xmm[0]))
+extern void freebsd_sigreturn(ExceptionInformation *);
+#define SIGNUM_FOR_INTN_TRAP SIGBUS
+#define IS_MAYBE_INT_TRAP(info,xp) ((xp->uc_mcontext.mc_trapno =3D=3D T_PR=
OTFLT) && ((xp->uc_mcontext.mc_err & 7) =3D=3D 2))
+#define IS_PAGE_FAULT(info,xp) (xp->uc_mcontext.mc_trapno =3D=3D T_PAGEFLT)
+#define SIGRETURN(context) freebsd_sigreturn(context)
+
+#include "os-freebsd.h"
Modified: trunk/source/lisp-kernel/platform-freebsdx8664.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-freebsdx8664.h (original)
+++ trunk/source/lisp-kernel/platform-freebsdx8664.h Sun Apr 18 05:58:15 20=
10
@@ -29,3 +29,19 @@
=
#include "lisptypes.h"
#include "x86-constants64.h"
+
+#include <machine/fpu.h>
+#define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext)))
+#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
+#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) =3D (natural)(new)
+#define eflags_register(xp) xpGPR(xp,Iflags)
+#define xpPC(x) xpGPR(x,Iip)
+#define xpMMXreg(x,n) *((natural *)(&(((struct savefpu *)(&(x)->uc_mcontex=
t.mc_fpstate))->sv_fp[n])))
+#define xpXMMregs(x)(&(((struct savefpu *)(&(x)->uc_mcontext.mc_fpstate))-=
>sv_xmm[0]))
+extern void freebsd_sigreturn(ExceptionInformation *);
+#define SIGNUM_FOR_INTN_TRAP SIGBUS
+#define IS_MAYBE_INT_TRAP(info,xp) ((xp->uc_mcontext.mc_trapno =3D=3D T_PR=
OTFLT) && ((xp->uc_mcontext.mc_err & 7) =3D=3D 2))
+#define IS_PAGE_FAULT(info,xp) (xp->uc_mcontext.mc_trapno =3D=3D T_PAGEFLT)
+#define SIGRETURN(context) freebsd_sigreturn(context)
+
+#include "os-freebsd.h"
Modified: trunk/source/lisp-kernel/platform-linuxppc.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-linuxppc.h (original)
+++ trunk/source/lisp-kernel/platform-linuxppc.h Sun Apr 18 05:58:15 2010
@@ -58,3 +58,5 @@
*/
#define DarwinSigReturn(context)
#define SIGRETURN(context)
+
+#include "os-linux.h"
Modified: trunk/source/lisp-kernel/platform-linuxppc64.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-linuxppc64.h (original)
+++ trunk/source/lisp-kernel/platform-linuxppc64.h Sun Apr 18 05:58:15 2010
@@ -57,3 +57,5 @@
*/
#define DarwinSigReturn(context)
#define SIGRETURN(context)
+
+#include "os-linux.h"
Modified: trunk/source/lisp-kernel/platform-linuxx8632.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-linuxx8632.h (original)
+++ trunk/source/lisp-kernel/platform-linuxx8632.h Sun Apr 18 05:58:15 2010
@@ -30,3 +30,17 @@
=
#include "lisptypes.h"
#include "x86-constants32.h"
+
+/* xp accessors */
+#define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext.gregs)))
+#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
+#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) =3D (natural)(new)
+#define xpPC(x) (xpGPR(x,Iip))
+#define xpMMXreg(x,n) *((natural *)(&((x)->uc_mcontext.fpregs->_st[n])))
+#define eflags_register(xp) xpGPR(xp,Iflags)
+#define SIGNUM_FOR_INTN_TRAP SIGSEGV
+#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,REG_TRAPNO)=3D=3D0xd)&&((xpG=
PR(xp,REG_ERR)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,REG_TRAPNO)=3D=3D0xe)
+#define SIGRETURN(context)
+
+#include "os-linux.h"
Modified: trunk/source/lisp-kernel/platform-linuxx8664.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-linuxx8664.h (original)
+++ trunk/source/lisp-kernel/platform-linuxx8664.h Sun Apr 18 05:58:15 2010
@@ -29,3 +29,17 @@
=
#include "lisptypes.h"
#include "x86-constants64.h"
+
+/* xp accessors */
+#define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext.gregs)))
+#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
+#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) =3D (natural)(new)
+#define xpPC(x) (xpGPR(x,Iip))
+#define xpMMXreg(x,n) *((natural *)(&((x)->uc_mcontext.fpregs->_st[n])))
+#define eflags_register(xp) xpGPR(xp,Iflags)
+#define SIGNUM_FOR_INTN_TRAP SIGSEGV
+#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,REG_TRAPNO)=3D=3D0xd)&&((xpG=
PR(xp,REG_ERR)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,REG_TRAPNO)=3D=3D0xe)
+#define SIGRETURN(context)
+
+#include "os-linux.h"
Modified: trunk/source/lisp-kernel/platform-solarisx64.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-solarisx64.h (original)
+++ trunk/source/lisp-kernel/platform-solarisx64.h Sun Apr 18 05:58:15 2010
@@ -29,3 +29,21 @@
=
#include "lisptypes.h"
#include "x86-constants64.h"
+
+#define xpGPRvector(x) ((x)->uc_mcontext.gregs)
+#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
+#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) =3D (natural)(new)
+#define xpPC(x) xpGPR(x,Iip)
+#define eflags_register(xp) xpGPR(xp,Iflags)
+#define xpXMMregs(x)(&((x)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xmm=
[0]))
+#define SIGNUM_FOR_INTN_TRAP SIGSEGV
+#ifdef X8664
+#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,REG_TRAPNO)=3D=3D0xd)&&((xpG=
PR(xp,REG_ERR)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,REG_TRAPNO)=3D=3D0xe)
+#else
+#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,TRAPNO)=3D=3D0xd)&&((xpGPR(x=
p,ERR)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,TRAPNO)=3D=3D0xe)
+#endif
+#define SIGRETURN(context) setcontext(context)
+
+#include "os-solaris.h"
Modified: trunk/source/lisp-kernel/platform-solarisx86.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-solarisx86.h (original)
+++ trunk/source/lisp-kernel/platform-solarisx86.h Sun Apr 18 05:58:15 2010
@@ -29,3 +29,22 @@
=
#include "lisptypes.h"
#include "x86-constants32.h"
+
+#define xpGPRvector(x) ((x)->uc_mcontext.gregs)
+#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
+#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) =3D (natural)(new)
+#define xpPC(x) xpGPR(x,Iip)
+#define eflags_register(xp) xpGPR(xp,Iflags)
+#define xpXMMregs(x)(&((x)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xmm=
[0]))
+#define xpMMXreg(x,n)*(natural *)(&(((struct fnsave_state *)(&(((x)->uc_mc=
ontext.fpregs))))->f_st[n]))
+#define SIGNUM_FOR_INTN_TRAP SIGSEGV
+#ifdef X8664
+#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,REG_TRAPNO)=3D=3D0xd)&&((xpG=
PR(xp,REG_ERR)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,REG_TRAPNO)=3D=3D0xe)
+#else
+#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,TRAPNO)=3D=3D0xd)&&((xpGPR(x=
p,ERR)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,TRAPNO)=3D=3D0xe)
+#endif
+#define SIGRETURN(context) setcontext(context)
+
+#include "os-solaris.h"
Modified: trunk/source/lisp-kernel/platform-win32.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-win32.h (original)
+++ trunk/source/lisp-kernel/platform-win32.h Sun Apr 18 05:58:15 2010
@@ -31,3 +31,25 @@
=
#include "lisptypes.h"
#include "x86-constants32.h"
+
+#define xpGPRvector(x) ((DWORD *)(&(x)->Edi))
+#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
+#define xpPC(x) xpGPR(x,Iip)
+#define eflags_register(xp) xp->EFlags
+#define xpFPRvector(x) ((natural *)(&(x->ExtendedRegisters[10*16])))
+#define xpMMXreg(x,n) (*((u64_t *)(&(x->FloatSave.RegisterArea[10*(n)]))))
+#define xpMXCSRptr(x) (DWORD *)(&(x->ExtendedRegisters[24]))
+
+#ifdef SOLARIS
+#define SIGNUM_FOR_INTN_TRAP SIGSEGV
+#ifdef X8664
+#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,REG_TRAPNO)=3D=3D0xd)&&((xpG=
PR(xp,REG_ERR)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,REG_TRAPNO)=3D=3D0xe)
+#else
+#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,TRAPNO)=3D=3D0xd)&&((xpGPR(x=
p,ERR)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,TRAPNO)=3D=3D0xe)
+#endif
+#define SIGRETURN(context) setcontext(context)
+#endif
+
+#include "os-windows.h"
Modified: trunk/source/lisp-kernel/platform-win64.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/platform-win64.h (original)
+++ trunk/source/lisp-kernel/platform-win64.h Sun Apr 18 05:58:15 2010
@@ -32,3 +32,23 @@
=
#include "lisptypes.h"
#include "x86-constants64.h"
+
+#define xpGPRvector(x) ((DWORD64 *)(&(x)->Rax))
+#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
+#define xpPC(x) xpGPR(x,Iip)
+#define eflags_register(xp) xp->EFlags
+#define xpMXCSRptr(x) (DWORD *)(&(x->MxCsr))
+
+#ifdef SOLARIS
+#define SIGNUM_FOR_INTN_TRAP SIGSEGV
+#ifdef X8664
+#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,REG_TRAPNO)=3D=3D0xd)&&((xpG=
PR(xp,REG_ERR)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,REG_TRAPNO)=3D=3D0xe)
+#else
+#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,TRAPNO)=3D=3D0xd)&&((xpGPR(x=
p,ERR)&7)=3D=3D2))
+#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,TRAPNO)=3D=3D0xe)
+#endif
+#define SIGRETURN(context) setcontext(context)
+#endif
+
+#include "os-windows.h"
Modified: trunk/source/lisp-kernel/solarisx64/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/solarisx64/Makefile (original)
+++ trunk/source/lisp-kernel/solarisx64/Makefile Sun Apr 18 05:58:15 2010
@@ -59,7 +59,8 @@
=
CHEADERS =3D area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
- Threads.h x86-constants64.h x86-exceptions.h lisptypes.h $(PLATFORM_H)
+ Threads.h x86-constants64.h x86-exceptions.h lisptypes.h \
+ $(PLATFORM_H) constants.h os-solaris.h
=
=
KSPOBJ =3D $(SPOBJ)
Modified: trunk/source/lisp-kernel/solarisx86/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/solarisx86/Makefile (original)
+++ trunk/source/lisp-kernel/solarisx86/Makefile Sun Apr 18 05:58:15 2010
@@ -58,7 +58,8 @@
=
CHEADERS =3D area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
- Threads.h x86-constants32.h x86-exceptions.h lisptypes.h $(PLATFORM_H)
+ Threads.h x86-constants32.h x86-exceptions.h lisptypes.h \
+ $(PLATFORM_H) constants.h os-solaris.h
=
=
KSPOBJ =3D $(SPOBJ)
Modified: trunk/source/lisp-kernel/win32/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/win32/Makefile (original)
+++ trunk/source/lisp-kernel/win32/Makefile Sun Apr 18 05:58:15 2010
@@ -74,7 +74,7 @@
CHEADERS =3D area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
Threads.h x86-constants32.h x86-exceptions.h lisptypes.h \
- $(PLATFORM_H)
+ $(PLATFORM_H) constsnts.h os-windows.h
=
=
KSPOBJ =3D $(SPOBJ)
Modified: trunk/source/lisp-kernel/win64/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/win64/Makefile (original)
+++ trunk/source/lisp-kernel/win64/Makefile Sun Apr 18 05:58:15 2010
@@ -73,7 +73,7 @@
CHEADERS =3D area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
Threads.h x86-constants64.h x86-exceptions.h lisptypes.h \
- $(PLATFORM_H)
+ $(PLATFORM_H) constants.h os-windows.h
=
=
KSPOBJ =3D $(SPOBJ)
Modified: trunk/source/lisp-kernel/x86-exceptions.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/x86-exceptions.h (original)
+++ trunk/source/lisp-kernel/x86-exceptions.h Sun Apr 18 05:58:15 2010
@@ -18,116 +18,6 @@
#define X86_EXCEPTIONS_H 1
=
typedef u8_t opcode, *pc;
-
-#ifdef LINUX
-#define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext.gregs)))
-#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
-#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) =3D (natural)(new)
-#define xpPC(x) (xpGPR(x,Iip))
-#define xpMMXreg(x,n) *((natural *)(&((x)->uc_mcontext.fpregs->_st[n])))
-#define eflags_register(xp) xpGPR(xp,Iflags)
-#endif
-
-#ifdef DARWIN
-#define DARWIN_USE_PSEUDO_SIGRETURN 1
-#include <sys/syscall.h>
-#define DarwinSigReturn(context) do {\
- darwin_sigreturn(context);\
- Bug(context,"sigreturn returned");\
- } while (0)
-
-#define xpGPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__ss)))
-#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
-#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) =3D (natural)(new)
-#define xpPC(x) (xpGPR(x,Iip))
-#define eflags_register(xp) xpGPR(xp,Iflags)
-#define xpFPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__fs.__fpu_xmm0)))
-#define xpMMXvector(x) (&(UC_MCONTEXT(x)->__fs.__fpu_stmm0))
-/* Note that this yields only the lower half of the MMX reg on x8632 */
-#define xpMMXreg(x,n) *(natural *)&(xpMMXvector(x)[n])
-
-#include <mach/mach.h>
-#include <mach/mach_error.h>
-#include <mach/machine/thread_state.h>
-#include <mach/machine/thread_status.h>
-
-pthread_mutex_t *mach_exception_lock;
-
-#endif
-
-#ifdef FREEBSD
-#ifdef X8664
-#include <machine/fpu.h>
-#else
-#include "freebsdx8632/fpu.h"
-#endif
-#define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext)))
-#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
-#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) =3D (natural)(new)
-#define eflags_register(xp) xpGPR(xp,Iflags)
-#define xpPC(x) xpGPR(x,Iip)
-#ifdef X8664
-#define xpMMXreg(x,n) *((natural *)(&(((struct savefpu *)(&(x)->uc_mcontex=
t.mc_fpstate))->sv_fp[n])))
-#define xpXMMregs(x)(&(((struct savefpu *)(&(x)->uc_mcontext.mc_fpstate))-=
>sv_xmm[0]))
-#else
-#define xpMMXreg(x,n) *((natural *)(&(((struct ccl_savexmm *)(&(x)->uc_mco=
ntext.mc_fpstate))->sv_fp[n])))
-#define xpXMMregs(x)(&(((struct ccl_savexmm *)(&(x)->uc_mcontext.mc_fpstat=
e))->sv_xmm[0]))
-#endif
-#endif
-
-#ifdef SOLARIS
-#define xpGPRvector(x) ((x)->uc_mcontext.gregs)
-#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
-#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) =3D (natural)(new)
-#define xpPC(x) xpGPR(x,Iip)
-#define eflags_register(xp) xpGPR(xp,Iflags)
-#define xpXMMregs(x)(&((x)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xmm=
[0]))
-#ifdef X8632
-#define xpMMXreg(x,n)*(natural *)(&(((struct fnsave_state *)(&(((x)->uc_mc=
ontext.fpregs))))->f_st[n]))
-#endif
-#endif
-
-#ifdef WINDOWS
-#ifdef X8664
-#define xpGPRvector(x) ((DWORD64 *)(&(x)->Rax))
-#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
-#define xpPC(x) xpGPR(x,Iip)
-#define eflags_register(xp) xp->EFlags
-#define xpMXCSRptr(x) (DWORD *)(&(x->MxCsr))
-#else
-#define xpGPRvector(x) ((DWORD *)(&(x)->Edi))
-#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
-#define xpPC(x) xpGPR(x,Iip)
-#define eflags_register(xp) xp->EFlags
-#define xpFPRvector(x) ((natural *)(&(x->ExtendedRegisters[10*16])))
-#define xpMMXreg(x,n) (*((u64_t *)(&(x->FloatSave.RegisterArea[10*(n)]))))
-#define xpMXCSRptr(x) (DWORD *)(&(x->ExtendedRegisters[24]))
-#endif
-#endif
-
-#ifdef DARWIN
-#define SIGNAL_FOR_PROCESS_INTERRUPT SIGUSR1
-#endif
-#ifdef LINUX
-#define SIGNAL_FOR_PROCESS_INTERRUPT SIGPWR
-#endif
-#ifdef FREEBSD
-#define SIGNAL_FOR_PROCESS_INTERRUPT SIGEMT
-#endif
-#ifdef SOLARIS
-#define SIGNAL_FOR_PROCESS_INTERRUPT SIGUSR1
-#endif
-#ifdef WINDOWS
-#define SIGNAL_FOR_PROCESS_INTERRUPT SIGINT
-#ifndef SIGBUS
-#define SIGBUS 10
-#endif
-#ifndef CONTEXT_ALL
-#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS =
| CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS | CONTEXT_EXTENDED_REGIS=
TERS)
-#endif
-#endif
-
-
=
void switch_to_foreign_stack(void*, ...);
=
@@ -169,51 +59,9 @@
ID_clear_tcr_save_allocptr_tag_instruction
} alloc_instruction_id;
=
-#ifdef LINUX
-#define SIGNUM_FOR_INTN_TRAP SIGSEGV
-#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,REG_TRAPNO)=3D=3D0xd)&&((xpG=
PR(xp,REG_ERR)&7)=3D=3D2))
-#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,REG_TRAPNO)=3D=3D0xe)
-#define SIGRETURN(context)
-#endif
=
-#ifdef FREEBSD
-extern void freebsd_sigreturn(ExceptionInformation *);
-#define SIGNUM_FOR_INTN_TRAP SIGBUS
-#define IS_MAYBE_INT_TRAP(info,xp) ((xp->uc_mcontext.mc_trapno =3D=3D T_PR=
OTFLT) && ((xp->uc_mcontext.mc_err & 7) =3D=3D 2))
-#define IS_PAGE_FAULT(info,xp) (xp->uc_mcontext.mc_trapno =3D=3D T_PAGEFLT)
-#define SIGRETURN(context) freebsd_sigreturn(context)
-#endif
=
-#ifdef DARWIN
-#define SIGNUM_FOR_INTN_TRAP SIGSEGV /* Not really, but our Mach handler f=
akes that */
-#define IS_MAYBE_INT_TRAP(info,xp) ((UC_MCONTEXT(xp)->__es.__trapno =3D=3D=
0xd) && (((UC_MCONTEXT(xp)->__es.__err)&7)=3D=3D2))
-#define IS_PAGE_FAULT(info,xp) (UC_MCONTEXT(xp)->__es.__trapno =3D=3D 0xe)
-/* The x86 version of sigreturn just needs the context argument; the
- hidden, magic "flavor" argument that sigtramp uses is ignored. */
-#define SIGRETURN(context) DarwinSigReturn(context)
-#endif
=
-#ifdef SOLARIS
-#define SIGNUM_FOR_INTN_TRAP SIGSEGV
-#ifdef X8664
-#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,REG_TRAPNO)=3D=3D0xd)&&((xpG=
PR(xp,REG_ERR)&7)=3D=3D2))
-#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,REG_TRAPNO)=3D=3D0xe)
-#else
-#define IS_MAYBE_INT_TRAP(info,xp) ((xpGPR(xp,TRAPNO)=3D=3D0xd)&&((xpGPR(x=
p,ERR)&7)=3D=3D2))
-#define IS_PAGE_FAULT(info,xp) (xpGPR(xp,TRAPNO)=3D=3D0xe)
-#endif
-#define SIGRETURN(context) setcontext(context)
-#endif
-
-#ifdef WINDOWS
-#define SIGNUM_FOR_INTN_TRAP SIGSEGV /* Also fake */
-#define IS_MAYBE_INT_TRAP(info,xp) \
- ((info->ExceptionCode =3D=3D EXCEPTION_ACCESS_VIOLATION) && \
- (info->ExceptionInformation[0]=3D=3D0) && \
- (info->ExceptionInformation[1]=3D=3D(ULONG_PTR)(-1L)))
-#define IS_PAGE_FAULT(info,xp) (1)
-#define SIGRETURN(context) /* for now */
-#endif
=
/* Please go away. */
#ifdef DARWIN_GS_HACK
@@ -249,13 +97,6 @@
extern natural get_mxcsr();
extern void set_mxcsr(natural);
=
-#ifdef WINDOWS
-typedef struct {
- HANDLE h;
- OVERLAPPED *o;
-} pending_io;
-#endif
-
#ifdef X8632
/* The 32-bit immediate value in the instruction
* "(mov ($ 0x12345678) (% fn))" at a tagged return address
More information about the Openmcl-cvs-notifications
mailing list