[kaffe] CVS kaffe (robilad): Merged in Kurt Miller's port to x86_64-openbsd from

Kaffe CVS cvs-commits at kaffe.org
Wed Sep 12 06:30:24 PDT 2007


PatchSet 7542 
Date: 2007/09/12 13:28:59
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
2007-09-12  Dalibor Topic  <robilad at kaffe.org>

        Merged in Kurt Miller's port to x86_64-openbsd from
        OpenBSD ports repository.

        * README: Added x86_64-openbsd.
        * WHATSNEW: Added x86_64-openbsd port.

2007-09-12  Kurt Miller <kurt at intricatesoftware.com>

        * config/x86_64/openbsd2/config.frag,
        config/x86_64/openbsd2/md.c,
        config/x86_64/openbsd2/md.h: New files.

        * config/Makefile.am (EXTRA_DIST): Added x86_64/openbsd2/config.frag,
        x86_64/openbsd2/md.c and x86_64/openbsd2/md.h.

        * config/x86_64/threads.h (THREASTACKSIZE): Increase to 512K.

Members: 
	ChangeLog:1.5040->1.5041 
	README:1.43->1.44 
	WHATSNEW:1.63->1.64 
	config/Makefile.am:1.71->1.72 
	config/x86_64/threads.h:INITIAL->1.4 
	config/x86_64/openbsd2/config.frag:INITIAL->1.1 
	config/x86_64/openbsd2/md.c:INITIAL->1.1 
	config/x86_64/openbsd2/md.h:INITIAL->1.1 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5040 kaffe/ChangeLog:1.5041
--- kaffe/ChangeLog:1.5040	Wed Sep 12 13:06:45 2007
+++ kaffe/ChangeLog	Wed Sep 12 13:28:59 2007
@@ -1,5 +1,24 @@
 2007-09-12  Dalibor Topic  <robilad at kaffe.org>
 
+	Merged in Kurt Miller's port to x86_64-openbsd from
+	OpenBSD ports repository.
+
+	* README: Added x86_64-openbsd.
+	* WHATSNEW: Added x86_64-openbsd port.
+
+2007-09-12  Kurt Miller <kurt at intricatesoftware.com>
+
+	* config/x86_64/openbsd2/config.frag,
+	config/x86_64/openbsd2/md.c,
+	config/x86_64/openbsd2/md.h: New files.
+
+	* config/Makefile.am (EXTRA_DIST): Added x86_64/openbsd2/config.frag,
+	x86_64/openbsd2/md.c and x86_64/openbsd2/md.h.
+
+	* config/x86_64/threads.h (THREASTACKSIZE): Increase to 512K.
+
+2007-09-12  Dalibor Topic  <robilad at kaffe.org>
+
 	Fix for bug #91.
 	* libraries/clib/awt/X/Makefile.am (libxawt_la_LDFLAGS),
 	libraries/clib/awt/xynth/Makefile.am (libxynthawt_la_LDFLAGS),
Index: kaffe/README
diff -u kaffe/README:1.43 kaffe/README:1.44
--- kaffe/README:1.43	Mon Aug  6 12:52:04 2007
+++ kaffe/README	Wed Sep 12 13:29:00 2007
@@ -70,7 +70,7 @@
   ------------------------------------------------------------------------
   SuperH    | I    |    Linux 2.x
   ------------------------------------------------------------------------
-  x86-64    | I    |    Linux 2.x	FreeBSD 2.x +
+  x86-64    | I    |    Linux 2.x	FreeBSD 2.x +   OpenBSD 4.x
   ========================================================================
 
 Who can use Kaffe?
Index: kaffe/WHATSNEW
diff -u kaffe/WHATSNEW:1.63 kaffe/WHATSNEW:1.64
--- kaffe/WHATSNEW:1.63	Tue Aug  7 03:16:30 2007
+++ kaffe/WHATSNEW	Wed Sep 12 13:29:00 2007
@@ -2,13 +2,14 @@
 ----------------------------
 
 * Support for using an existing GNU Classpath installation.
+* Updated internal Classpath to version 0.93.
 * Fixes for gcc 4.1.x.
 * Added --disable-zlib-zip option to use GNU Classpath's
   java.util.zip implementation.
 * Removed comm, servlet, microsoft and pjava extensions.
 * Removed fastjar, zlib and boehm gc copies.
 * Xynth Windowing System based AWT backend.
-* Ported to i386-GNU/kFreeBSD, i386-Interix.
+* Ported to i386-GNU/kFreeBSD, i386-Interix, x86_64-openbsd.
 
 What's New In Kaffe 1.1.7
 ------------------------------------------------------
Index: kaffe/config/Makefile.am
diff -u kaffe/config/Makefile.am:1.71 kaffe/config/Makefile.am:1.72
--- kaffe/config/Makefile.am:1.71	Tue Jul 11 14:34:10 2006
+++ kaffe/config/Makefile.am	Wed Sep 12 13:29:00 2007
@@ -114,6 +114,9 @@
 	x86_64/linux/md.c \
 	x86_64/linux/md.h \
 	x86_64/linux/sigcontextinfo.h \
+	x86_64/openbsd2/config.frag \
+	x86_64/openbsd2/md.c \
+	x86_64/openbsd2/md.h \
 	x86_64/threads.h \
 	x86_64/sysdepCallMethod.h \
 	i386/atomic.h \
===================================================================
Checking out kaffe/config/x86_64/threads.h
RCS:  /home/cvs/kaffe/kaffe/config/x86_64/threads.h,v
VERS: 1.4
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/x86_64/threads.h	Wed Sep 12 13:30:22 2007
@@ -0,0 +1,32 @@
+/*
+ * x86_64/threads.h
+ * X86-64 threading information.
+ *
+ * Copyright (c) 2002
+ *	MandrakeSoft.  All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+
+#ifndef __x86_64_threads_h
+#define __x86_64_threads_h
+
+/*
+ * Set a default size for the stack.
+ */
+#if defined(INTERPRETER)
+#define THREADSTACKSIZE         (512 * 1024)
+#else
+#define THREADSTACKSIZE         (64 * 1024)
+#endif
+
+/*
+ * Stack offset.
+ * This is the offset into the setjmp buffer where the stack pointer is
+ * stored.  This may be different with different OSes.
+ */
+#define	SP_OFFSET	6
+#define FP_OFFSET	1
+
+#endif
===================================================================
Checking out kaffe/config/x86_64/openbsd2/config.frag
RCS:  /home/cvs/kaffe/kaffe/config/x86_64/openbsd2/config.frag,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/x86_64/openbsd2/config.frag	Wed Sep 12 13:30:23 2007
@@ -0,0 +1,3 @@
+#
+# amd64/OpenBSD configuration
+#
===================================================================
Checking out kaffe/config/x86_64/openbsd2/md.c
RCS:  /home/cvs/kaffe/kaffe/config/x86_64/openbsd2/md.c,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/x86_64/openbsd2/md.c	Wed Sep 12 13:30:24 2007
@@ -0,0 +1,48 @@
+/*
+ * amd64/openbsd2/md.c
+ * OpenBSD amd64 specific functions.
+ *
+ * Copyright (c) 2006
+ *      Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ */
+
+#include "config.h"
+
+#if defined(KAFFE_SYSTEM_UNIX_PTHREADS)
+
+#include <sys/signal.h>
+#include <pthread.h>
+#include <pthread_np.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void *mdGetStackEnd(void)
+{
+    stack_t stack;
+    if (pthread_stackseg_np(pthread_self(), &stack) != 0)
+      {
+        fprintf(stderr,
+                "Kaffe VM was unable to retrieve the pointer to the stack base\n"
+                "Aborting...\n");
+        exit(1);
+      }
+    return stack.ss_sp;
+}
+
+size_t mdGetStackSize(void)
+{
+    stack_t stack;
+    if (pthread_stackseg_np(pthread_self(), &stack) != 0)
+      {
+        fprintf(stderr,
+                "Kaffe VM has not been able to retrieve the stack size\n"
+                "Aborting...\n");
+        exit(1);
+      }
+    return stack.ss_size;
+}
+
+#endif
===================================================================
Checking out kaffe/config/x86_64/openbsd2/md.h
RCS:  /home/cvs/kaffe/kaffe/config/x86_64/openbsd2/md.h,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/x86_64/openbsd2/md.h	Wed Sep 12 13:30:24 2007
@@ -0,0 +1,72 @@
+/*
+ * amd64/openbsd2/md.h
+ * OpenBSD amd64 configuration information.
+ *
+ * Copyright (c) 2006
+ *      Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ */
+
+#ifndef __amd64_openbsd2_md_h
+#define __amd64_openbsd2_md_h
+
+#include "x86_64/common.h"
+#include "x86_64/threads.h"
+
+#if defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
+#if defined(HAVE_SYS_RESOURCE_H)
+#include <sys/resource.h>
+#endif
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
+#undef	SP_OFFSET
+#define	SP_OFFSET	2
+#undef  FP_OFFSET
+#define FP_OFFSET	3
+
+/* Define signal context macros for xprofiling */
+#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(sc) (sc)
+#define SIGNAL_PC(scp) (scp)->sc_rip
+#define STACK_POINTER(scp) (scp)->sc_rsp
+
+#if defined(TRANSLATOR)
+#include "jit-md.h"
+#endif
+
+#if defined(KAFFE_SYSTEM_UNIX_PTHREADS)
+
+#define KAFFEMD_STACK_ERROR 0
+#define KAFFEMD_STACK_INFINITE KAFFEMD_STACK_ERROR
+
+#define KAFFEMD_STACKSIZE
+extern size_t mdGetStackSize(void);
+
+/* this is only used for the main thread and is ok for that */
+/* this may change with rthreads when thats done */
+static inline void mdSetStackSize(rlim_t limit)
+{
+  struct rlimit rl;
+
+  getrlimit(RLIMIT_STACK, &rl);
+  rl.rlim_cur = limit;
+  setrlimit(RLIMIT_STACK, &rl);
+}
+
+#define KAFFEMD_STACKEND
+extern void *mdGetStackEnd(void);
+
+#else /* KAFFE_SYSTEM_UNIX_PTHREADS */
+
+#include "kaffe-unix-stack.h"
+
+#endif /* KAFFE_SYSTEM_UNIX_PTHREADS */
+
+#endif




More information about the kaffe mailing list