[kaffe] CVS kaffe (robilad): Added port to amd64-freebsd
Kaffe CVS
cvs-commits at kaffe.org
Thu Oct 21 07:29:39 PDT 2004
PatchSet 5320
Date: 2004/10/21 14:25:46
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Added port to amd64-freebsd
2004-10-21 Eric Anholt <eta at lclark.edu>
* config/x86_64/freebsd2/config.frag,
config/x86_64/freebsd2/md.c,
config/x86_64/freebsd2/md.h:
Added port to amd64-freebsd.
Members:
ChangeLog:1.2872->1.2873
config/x86_64/freebsd2/config.frag:INITIAL->1.1
config/x86_64/freebsd2/md.c:INITIAL->1.1
config/x86_64/freebsd2/md.h:INITIAL->1.1
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2872 kaffe/ChangeLog:1.2873
--- kaffe/ChangeLog:1.2872 Thu Oct 21 14:20:31 2004
+++ kaffe/ChangeLog Thu Oct 21 14:25:46 2004
@@ -1,5 +1,12 @@
2004-10-21 Eric Anholt <eta at lclark.edu>
+ * config/x86_64/freebsd2/config.frag,
+ config/x86_64/freebsd2/md.c,
+ config/x86_64/freebsd2/md.h:
+ Added port to amd64-freebsd.
+
+2004-10-21 Eric Anholt <eta at lclark.edu>
+
* kaffe/kaffevm/intrp/methodcalls.c:
Added missing extern.h include to fix crash on amd64.
===================================================================
Checking out kaffe/config/x86_64/freebsd2/config.frag
RCS: /home/cvs/kaffe/kaffe/config/x86_64/freebsd2/config.frag,v
VERS: 1.1
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/config/x86_64/freebsd2/config.frag Thu Oct 21 14:29:39 2004
@@ -0,0 +1,3 @@
+#
+# amd64/FreeBSD configuration
+#
===================================================================
Checking out kaffe/config/x86_64/freebsd2/md.c
RCS: /home/cvs/kaffe/kaffe/config/x86_64/freebsd2/md.c,v
VERS: 1.1
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/config/x86_64/freebsd2/md.c Thu Oct 21 14:29:39 2004
@@ -0,0 +1,36 @@
+/*
+ * x86_64/freebsd2/md.c
+ * FreeBSD AMD64 specific functions.
+ *
+ * Copyright(c) 2004 The Kaffe.org's developers.
+ *
+ * Some parts are imported from the boehm-gc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+
+#include "config.h"
+#include "config-std.h"
+
+#if defined(HAVE_SYS_SYSCTL_H)
+#include <sys/sysctl.h>
+
+void *mdGetStackEnd(void)
+{
+ int control_name[2] =
+ { CTL_KERN, KERN_USRSTACK};
+ void *stackbase;
+ size_t len = sizeof(void *);
+
+ if (sysctl(control_name, 2, &stackbase, &len, NULL, 0))
+ {
+ fprintf(stderr,
+ "Kaffe VM has not been able to retrieve the pointer to the stack base\n"
+ "Aborting...\n");
+ exit(1);
+ }
+ return stackbase;
+}
+
+#endif
===================================================================
Checking out kaffe/config/x86_64/freebsd2/md.h
RCS: /home/cvs/kaffe/kaffe/config/x86_64/freebsd2/md.h,v
VERS: 1.1
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/config/x86_64/freebsd2/md.h Thu Oct 21 14:29:39 2004
@@ -0,0 +1,43 @@
+/*
+ * x86_64/freebsd2/md.h
+ * FreeBSD AMD64 configuration information.
+ *
+ * Copyright (c) 2002
+ * MandrakeSoft. All rights reserved.
+ *
+ * Copyright (c) 2001
+ * Transvirtual Technologies, Inc. All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+
+#ifndef __amd64_freebsd_md_h
+#define __amd64_freebsd_md_h
+
+#include "x86_64/common.h"
+#include "x86_64/threads.h"
+
+#undef SP_OFFSET
+#define SP_OFFSET 2
+#undef FP_OFFSET
+#define FP_OFFSET 3
+
+#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_pc
+#define STACK_POINTER(scp) (scp)->sc_rsp
+
+#if defined(TRANSLATOR)
+#include "jit-md.h"
+#endif
+
+#include "kaffe-unix-stack.h"
+
+#if defined(HAVE_SYS_SYSCTL_H)
+#define KAFFEMD_STACKEND
+extern void *mdGetStackEnd(void);
+#endif
+
+#endif
More information about the kaffe
mailing list