[kaffe] CVS kaffe (guilhem): sysdepCallMethod implemented for
m68k/openbsd2.
Kaffe CVS
cvs-commits at kaffe.org
Mon Aug 16 03:41:40 PDT 2004
PatchSet 5071
Date: 2004/08/16 10:33:34
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
sysdepCallMethod implemented for m68k/openbsd2.
Members:
ChangeLog:1.2629->1.2630
config/m68k/openbsd2/md.h:1.7->1.8
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2629 kaffe/ChangeLog:1.2630
--- kaffe/ChangeLog:1.2629 Mon Aug 16 02:43:39 2004
+++ kaffe/ChangeLog Mon Aug 16 10:33:34 2004
@@ -1,3 +1,9 @@
+2004-08-16 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * config/m68k/openbsd2/md.h
+ (sysdepCallMethod): Imported from netbsd and translated to MIT/GNU as
+ syntax.
+
2004-08-15 Dalibor Topic <robilad at kaffe.org>
* include/Makefile.am:
Index: kaffe/config/m68k/openbsd2/md.h
diff -u kaffe/config/m68k/openbsd2/md.h:1.7 kaffe/config/m68k/openbsd2/md.h:1.8
--- kaffe/config/m68k/openbsd2/md.h:1.7 Thu Jun 17 17:21:00 2004
+++ kaffe/config/m68k/openbsd2/md.h Mon Aug 16 10:33:37 2004
@@ -20,7 +20,6 @@
#include "m68k/common.h"
#include "m68k/threads.h"
-#include "m68k/sysdepCallMethod.h"
/*
* Stack offset.
@@ -46,5 +45,56 @@
#if defined(TRANSLATOR)
#include "jit-md.h"
#endif
+
+#define sysdepCallMethod(CALL) \
+ asm volatile ( \n\
+ "1: \n"\
+ " cmpl #0,%0 \n"\
+ " beq 3f \n"\
+ " subql #1,%0 \n"\
+ " cmpb #0,%2@(%0:l) \n"\
+ " beq 1b \n"\
+ " cmpb #1,%2@(%0:l) \n"\
+ " beq 2f \n"\
+ " movel %1@(4,%0:l:8),sp at - \n"\
+ "2: \n"\
+ " movel %1@(%0:l:8),sp at - \n"\
+ " jmp 1b \n"\
+ "3: \n"\
+ " jsr %3@ \n"\
+ : \
+ : "r" ((CALL)->nrargs), \
+ "a" ((CALL)->args), \
+ "a" ((CALL)->callsize), \
+ "a" ((CALL)->function) \
+ : "d0", "d1", "fp0", "cc", "memory"); \
+ asm volatile ( \n\
+ " cmpb #2,%0 \n"\
+ " bne 5f \n"\
+ " cmpb #0x44,%1 \n"\
+ " bne 4f \n"\
+ " fmoved fp0,%2@ \n"\
+ " jmp 7f \n"\
+ "4: \n"\
+ " movel d1,%2@(4) \n"\
+ " movel d0,%2@ \n"\
+ " jmp 7f \n"\
+ "5: \n"\
+ " cmpb #1,%0 \n"\
+ " bne 7f \n"\
+ " cmpb #0x46,%1 \n"\
+ " bne 6f \n"\
+ " fmoves fp0,%2@ \n"\
+ " jmp 7f \n"\
+ "6: \n"\
+ " movel d0,%2@ \n"\
+ "7: \n"\
+ : \
+ : "m" ((CALL)->retsize), \
+ "m" ((CALL)->rettype), \
+ "a" ((CALL)->ret) \
+ : "d0", "d1", "fp0", "cc", "memory"); \
+ asm volatile ("addw %0,sp", \
+ : : "r" ((CALL)->argsize * sizeof(jint)) : "cc")
#endif
More information about the kaffe
mailing list