[kaffe] CVS kaffe (guilhem): SIGNAL_ARGS implementation for sparc arch

Kaffe CVS Kaffe Mailing List <kaffe@kaffe.org>
Wed Aug 27 02:25:02 2003


PatchSet 3985 
Date: 2003/08/27 09:22:33
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
SIGNAL_ARGS implementation for sparc arch

Members: 
	ChangeLog:1.1582->1.1583 
	config/sparc/bsdi3/jit-md.h:1.1->1.2 
	config/sparc/bsdi3/md.h:1.1->1.2 
	config/sparc/linux/md.h:1.3->1.4 
	config/sparc/netbsd1/md.h:1.2->1.3 
	config/sparc/nextstep3/jit-md.h:1.1->1.2 
	config/sparc/nextstep3/md.h:1.1->1.2 
	config/sparc/openbsd2/jit-md.h:1.1->1.2 
	config/sparc/openbsd2/md.h:1.2->1.3 
	config/sparc/solaris2/jit-md.h:1.1->1.2 
	config/sparc/solaris2/md.h:1.1->1.2 
	config/sparc/sunos4/md.h:1.4->1.5 
	config/sparc/uxpds/jit-md.h:1.1->1.2 
	config/sparc/uxpds/md.h:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1582 kaffe/ChangeLog:1.1583
--- kaffe/ChangeLog:1.1582	Wed Aug 27 07:04:17 2003
+++ kaffe/ChangeLog	Wed Aug 27 09:22:33 2003
@@ -1,5 +1,20 @@
 2003-08-28  Guilhem Lavaux <guilhem@kaffe.org>
 
+	* config/sparc/bsdi3/md.h, config/sparc/linux/md.h,
+	config/sparc/netbsd1/md.h, config/sparc/nextstep3/md.h,
+	config/sparc/openbsd2/md.h, config/sparc/solaris2/md.h,
+	config/sparc/sunos4/md.h, config/sparc/uxpds/md.h,
+	config/sparc/bsdi3/jit-md.h, config/sparc/linux/jit-md.h,
+	config/sparc/netbsd1/jit-md.h, config/sparc/nextstep3/jit-md.h,
+	config/sparc/openbsd2/jit-md.h, config/sparc/solaris2/jit-md.h,
+	config/sparc/sunos4/jit-md.h, config/sparc/uxpds/jit-md.h:
+	Defined SIGNAL_ARGS using informations from EXCEPTIONPROTO.
+	Redefined EXCEPTIONPROTO as SIGNAL_ARGS(sig, ctx)
+	Moved some code from jit-md.h to md.h and defined
+	SIGNAL_CONTEXT_POINTER, GET_SIGNAL_CONTEXT_POINTER, SIGNAL_PC.
+
+2003-08-28  Guilhem Lavaux <guilhem@kaffe.org>
+
 	* config/i386/beos/md.h, config/i386/bsdi/md.h,
 	config/i386/cygwin32/md.h, config/i386/dgux/md.h,
 	config/i386/freebsd2/md.h, config/i386/gnu/md.h,
Index: kaffe/config/sparc/bsdi3/jit-md.h
diff -u kaffe/config/sparc/bsdi3/jit-md.h:1.1 kaffe/config/sparc/bsdi3/jit-md.h:1.2
--- kaffe/config/sparc/bsdi3/jit-md.h:1.1	Tue Mar 31 19:10:53 1998
+++ kaffe/config/sparc/bsdi3/jit-md.h	Wed Aug 27 09:22:34 2003
@@ -32,8 +32,7 @@
 /**/
 
 /* Function prototype for signal handlers */
-#define EXCEPTIONPROTO                                                  \
-        int sig, int code, struct sigcontext* ctx
+#define EXCEPTIONPROTO SIGNAL_ARGS(sig, ctx)
 
 /* Get the first exception frame from a signal handler */
 #define EXCEPTIONFRAME(f, c)                                            \
Index: kaffe/config/sparc/bsdi3/md.h
diff -u kaffe/config/sparc/bsdi3/md.h:1.1 kaffe/config/sparc/bsdi3/md.h:1.2
--- kaffe/config/sparc/bsdi3/md.h:1.1	Tue Mar 31 19:10:53 1998
+++ kaffe/config/sparc/bsdi3/md.h	Wed Aug 27 09:22:34 2003
@@ -15,6 +15,11 @@
 #include "sparc/common.h"
 #include "sparc/threads.h"
 
+#define SIGNAL_ARGS(sig, sc) int sig, int code, struct sigcontext* sc
+#define SIGNAL_CONTEXT_POINTER(scp) struct sigcontext* scp
+#define GET_SIGNAL_CONTEXT_POINTER(scp) (scp)
+#define SIGNAL_PC(scp) ((spc)->sc_pc)
+
 #if defined(TRANSLATOR)
 #include "jit-md.h"
 #endif
Index: kaffe/config/sparc/linux/md.h
diff -u kaffe/config/sparc/linux/md.h:1.3 kaffe/config/sparc/linux/md.h:1.4
--- kaffe/config/sparc/linux/md.h:1.3	Thu Dec 17 21:23:47 1998
+++ kaffe/config/sparc/linux/md.h	Wed Aug 27 09:22:34 2003
@@ -22,6 +22,23 @@
 
 #define	CONTEXT_SWITCH(F,T)	sparcLinuxContextSwitch(F, T)
 
+/**/
+/* Extra exception handling information. */
+/**/
+#if defined(HAVE_FEATURES_H)
+#include <features.h>
+#endif 
+#if defined(HAVE_SIGCONTEXT_H)
+#include <sigcontext.h> 
+#endif
+#include <asm/ptrace.h>
+
+/* Function prototype for signal handlers */
+#define	SIGNAL_ARGS(sig, sc) int sig, struct sigcontext* sc
+#define SIGNAL_CONTEXT_POINTER(scp) struct sigcontext* scp
+#define GET_SIGNAL_CONTEXT_POINTER(scp) (scp)
+#define SIGNAL_PC(scp) ((scp)->si_regs.pc)
+
 #if defined(TRANSLATOR)
 #include "jit-md.h"
 #endif
Index: kaffe/config/sparc/netbsd1/md.h
diff -u kaffe/config/sparc/netbsd1/md.h:1.2 kaffe/config/sparc/netbsd1/md.h:1.3
--- kaffe/config/sparc/netbsd1/md.h:1.2	Wed Mar  7 10:33:15 2001
+++ kaffe/config/sparc/netbsd1/md.h	Wed Aug 27 09:22:35 2003
@@ -15,6 +15,11 @@
 #include "sparc/common.h"
 #include "sparc/threads.h"
 
+#define SIGNAL_ARGS(sig, sc) int sig, int code, struct sigcontext* sc
+#define SIGNAL_CONTEXT_POINTER(scp) struct sigcontext* scp
+#define GET_SIGNAL_CONTEXT_POINTER(scp) (scp)
+#define SIGNAL_PC(scp) ((scp)->sc_pc)
+
 #if defined(TRANSLATOR)
 #include "jit-md.h"
 #endif
Index: kaffe/config/sparc/nextstep3/jit-md.h
diff -u kaffe/config/sparc/nextstep3/jit-md.h:1.1 kaffe/config/sparc/nextstep3/jit-md.h:1.2
--- kaffe/config/sparc/nextstep3/jit-md.h:1.1	Fri Apr  2 12:37:34 1999
+++ kaffe/config/sparc/nextstep3/jit-md.h	Wed Aug 27 09:22:35 2003
@@ -24,8 +24,7 @@
 /**/
 
 /* Function prototype for signal handlers */
-#define	EXCEPTIONPROTO							\
-	int sig, int code, struct sigcontext* ctx
+#define	EXCEPTIONPROTO SIGNAL_ARGS(sig, ctx)
 
 /* Get the first exception frame from a signal handler */
 #define	EXCEPTIONFRAME(f, c)						\
Index: kaffe/config/sparc/nextstep3/md.h
diff -u kaffe/config/sparc/nextstep3/md.h:1.1 kaffe/config/sparc/nextstep3/md.h:1.2
--- kaffe/config/sparc/nextstep3/md.h:1.1	Tue Mar 31 19:10:53 1998
+++ kaffe/config/sparc/nextstep3/md.h	Wed Aug 27 09:22:35 2003
@@ -15,6 +15,12 @@
 #include "sparc/common.h"
 #include "sparc/threads.h"
 
+#define SIGNAL_ARGS(sig, sc) int sig, int code, struct sigcontext* sc
+#define SIGNAL_CONTEXT_POINTER(scp) struct sigcontext* scp
+#define GET_SIGNAL_CONTEXT_POINTER(scp) (scp)
+#define SIGNAL_PC(scp) ((scp)->sc_eip)
+
+
 #if defined(TRANSLATOR)
 #include "jit-md.h"
 #endif
Index: kaffe/config/sparc/openbsd2/jit-md.h
diff -u kaffe/config/sparc/openbsd2/jit-md.h:1.1 kaffe/config/sparc/openbsd2/jit-md.h:1.2
--- kaffe/config/sparc/openbsd2/jit-md.h:1.1	Tue Mar 31 19:10:53 1998
+++ kaffe/config/sparc/openbsd2/jit-md.h	Wed Aug 27 09:22:36 2003
@@ -31,8 +31,7 @@
 /**/
 
 /* Function prototype for signal handlers */
-#define	EXCEPTIONPROTO							\
-	int sig, int code, struct sigcontext* ctx
+#define	EXCEPTIONPROTO SIGNAL_ARGS(sig, ctx)
 
 /* Get the first exception frame from a signal handler */
 #define	EXCEPTIONFRAME(f, c)						\
Index: kaffe/config/sparc/openbsd2/md.h
diff -u kaffe/config/sparc/openbsd2/md.h:1.2 kaffe/config/sparc/openbsd2/md.h:1.3
--- kaffe/config/sparc/openbsd2/md.h:1.2	Fri Jun 20 10:38:33 2003
+++ kaffe/config/sparc/openbsd2/md.h	Wed Aug 27 09:22:36 2003
@@ -18,6 +18,12 @@
 #undef SP_OFFSET
 #define SP_OFFSET 2
 
+/* Function prototype for signal handlers */
+#define	SIGNAL_ARGS(sig, sc) int sig, int code, struct sigcontext* sc
+#define SIGNAL_CONTEXT_POINTER(scp) struct sigcontext* scp
+#define GET_SIGNAL_CONTEXT_POINTER(scp) (scp)
+#define SIGNAL_PC(scp) ((scp)->sc_pc)
+
 #if defined(TRANSLATOR)
 #include "jit-md.h"
 #endif
Index: kaffe/config/sparc/solaris2/jit-md.h
diff -u kaffe/config/sparc/solaris2/jit-md.h:1.1 kaffe/config/sparc/solaris2/jit-md.h:1.2
--- kaffe/config/sparc/solaris2/jit-md.h:1.1	Tue Mar 31 19:10:53 1998
+++ kaffe/config/sparc/solaris2/jit-md.h	Wed Aug 27 09:22:36 2003
@@ -24,8 +24,7 @@
 #include <ucontext.h>
 
 /* Function prototype for signal handlers */
-#define	EXCEPTIONPROTO							\
-	int sig, siginfo_t* sip, ucontext_t* ctx
+#define	EXCEPTIONPROTO SIGNAL_ARGS(sig, ctx)
 
 /* Get the first exception frame from a signal handler */
 #define	EXCEPTIONFRAME(f, c)						\
Index: kaffe/config/sparc/solaris2/md.h
diff -u kaffe/config/sparc/solaris2/md.h:1.1 kaffe/config/sparc/solaris2/md.h:1.2
--- kaffe/config/sparc/solaris2/md.h:1.1	Tue Mar 31 19:10:53 1998
+++ kaffe/config/sparc/solaris2/md.h	Wed Aug 27 09:22:36 2003
@@ -15,6 +15,18 @@
 #include "sparc/common.h"
 #include "sparc/threads.h"
 
+/**/
+/* Extra exception handling information. */
+/**/
+#include <siginfo.h>
+#include <ucontext.h>
+
+/* Function prototype for signal handlers */
+#define	SIGNAL_ARGS(sig, sc) int sig, siginfo_t* sip, ucontext_t* sc
+#define SIGNAL_CONTEXT_POINTER(scp) ucontext_t* scp
+#define GET_SIGNAL_CONTEXT_POINTER(scp) (scp)
+#define SIGNAL_PC(scp) ((scp)->uc_mcontext.gregs[REG_PC])
+
 #if defined(TRANSLATOR)
 #include "jit-md.h"
 #endif
Index: kaffe/config/sparc/sunos4/md.h
diff -u kaffe/config/sparc/sunos4/md.h:1.4 kaffe/config/sparc/sunos4/md.h:1.5
--- kaffe/config/sparc/sunos4/md.h:1.4	Wed Jun  3 18:00:10 1998
+++ kaffe/config/sparc/sunos4/md.h	Wed Aug 27 09:22:36 2003
@@ -21,6 +21,11 @@
 #undef  SP_OFFSET
 #define SP_OFFSET       2
 
+#define SIGNAL_ARGS(sig, sc) int sig, int code, struct sigcontext* sc, char* addr
+#define SIGNAL_CONTEXT_POINTER(scp) struct sigcontext* scp
+#define GET_SIGNAL_CONTEXT_POINTER(scp) (scp)
+#define SIGNAL_PC(scp) ((scp)->sc_pc)
+
 #if defined(TRANSLATOR)
 #include "jit-md.h"
 #endif
Index: kaffe/config/sparc/uxpds/jit-md.h
diff -u kaffe/config/sparc/uxpds/jit-md.h:1.1 kaffe/config/sparc/uxpds/jit-md.h:1.2
--- kaffe/config/sparc/uxpds/jit-md.h:1.1	Tue Mar 31 19:10:53 1998
+++ kaffe/config/sparc/uxpds/jit-md.h	Wed Aug 27 09:22:37 2003
@@ -17,15 +17,8 @@
 /**/
 #include "sparc/jit.h"
 
-/**/
-/* Extra exception handling information. */
-/**/
-#include <siginfo.h>
-#include <ucontext.h>
-
 /* Function prototype for signal handlers */
-#define	EXCEPTIONPROTO							\
-	int sig, siginfo_t* sip, ucontext_t* ctx
+#define	EXCEPTIONPROTO SIGNAL_ARGS(sig, ctx)
 
 /* Get the first exception frame from a signal handler */
 #define	EXCEPTIONFRAME(f, c)						\
Index: kaffe/config/sparc/uxpds/md.h
diff -u kaffe/config/sparc/uxpds/md.h:1.1 kaffe/config/sparc/uxpds/md.h:1.2
--- kaffe/config/sparc/uxpds/md.h:1.1	Tue Mar 31 19:10:53 1998
+++ kaffe/config/sparc/uxpds/md.h	Wed Aug 27 09:22:37 2003
@@ -15,6 +15,18 @@
 #include "sparc/common.h"
 #include "sparc/threads.h"
 
+/**/
+/* Extra exception handling information. */
+/**/
+#include <siginfo.h>
+#include <ucontext.h>
+
+/* Function prototype for signal handlers */
+#define	SIGNAL_ARGS(sig, sc) int sig, siginfo_t* sip, ucontext_t* sc
+#define SIGNAL_CONTEXT_POINTER(scp) ucontext_t* scp
+#define GET_SIGNAL_CONTEXT_POINTER(scp) (scp)
+#define SIGNAL_PC(scp) ((scp)->uc_mcontext.gregs[REG_PC])
+
 #if defined(TRANSLATOR)
 #include "jit-md.h"
 #endif