[kaffe] CVS kaffe (dalibor): Fixed sysdepCallMaethod on m68k-linux

Kaffe CVS cvs-commits at kaffe.org
Wed Apr 28 10:27:01 PDT 2004


PatchSet 4707 
Date: 2004/04/28 17:03:54
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed sysdepCallMaethod on m68k-linux

2004-04-28  Kiyo Inaba <inaba at src.ricoh.co.jp>

        * config/m68k/linux/md.h:
        (sysdepCallMethod) Converted back to a macro to fix
        build on m68k-linux.

Members: 
	ChangeLog:1.2283->1.2284 
	config/m68k/linux/md.h:1.7->1.8 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2283 kaffe/ChangeLog:1.2284
--- kaffe/ChangeLog:1.2283	Wed Apr 28 16:22:41 2004
+++ kaffe/ChangeLog	Wed Apr 28 17:03:54 2004
@@ -1,3 +1,9 @@
+2004-04-28  Kiyo Inaba <inaba at src.ricoh.co.jp>
+
+	* config/m68k/linux/md.h:
+	(sysdepCallMethod) Converted back to a macro to fix
+	build on m68k-linux.
+
 2004-04-28  Adam Heath <doogie at debian.org>
 
 	* libraries/javalib/java/lang/reflect/Proxy.java:
Index: kaffe/config/m68k/linux/md.h
diff -u kaffe/config/m68k/linux/md.h:1.7 kaffe/config/m68k/linux/md.h:1.8
--- kaffe/config/m68k/linux/md.h:1.7	Tue Mar  9 15:15:35 2004
+++ kaffe/config/m68k/linux/md.h	Wed Apr 28 17:03:55 2004
@@ -51,46 +51,44 @@
  *	statement below is a 'because it works' version.
  */
 //	Linux version
-static inline void sysdepCallMethod(callMethodInfo *call)
-{
-	int extraargs[(call)->nrargs];
-	register int d0 asm ("d0");
-	register int d1 asm ("d1");
-	register double f0d asm ("fp0");
-	register float f0f asm ("fp0");
-	int *res;
-	int *args = extraargs;
-	int argidx;
-	for(argidx = 0; argidx < (call)->nrargs; ++argidx) {
-		if ((call)->callsize[argidx])
-			*args++ = (call)->args[argidx].i;
-		else
-			*args++ = (call)->args[argidx-1].j;
-	}
-	asm volatile ("jsr	%2@\n"
-		      : "=r" (d0), "=r" (d1)
-		      : "a" ((call)->function)
-		      : "cc", "memory");
-	if ((call)->retsize != 0) {
-		res = (int *)(call)->ret;
-	switch((call)->retsize) {
-	case 2:
-	  if ((call)->rettype == 'D')
-	    *(double*)res = f0d;
-	  else {
-		res[1] = d1;
-		res[0] = d0;
-	  }
-	  break;
-	case 1:
-	  if ((call)->rettype == 'F')
-	    *(double*)res = f0f;
-	  else
-		res[0] = d0;
-	  break;
-	}
-	}
-}
+#define sysdepCallMethod(CALL) do {				\
+	int extraargs[(CALL)->nrargs];				\
+	register int d0 asm ("d0");				\
+	register int d1 asm ("d1");				\
+	register double f0d asm ("fp0");			\
+	register float f0f asm ("fp0");				\
+	int *res;						\
+	int *args = extraargs;					\
+	int argidx;						\
+	for(argidx = 0; argidx < (CALL)->nrargs; ++argidx) {	\
+		if ((CALL)->callsize[argidx])			\
+			*args++ = (CALL)->args[argidx].i;	\
+		else						\
+			*args++ = (CALL)->args[argidx-1].j;	\
+	}							\
+	asm volatile ("jsr	%2@\n"				\
+	 : "=r" (d0), "=r" (d1)					\
+	 : "a" ((CALL)->function)				\
+	 : "cc", "memory");					\
+	if ((CALL)->retsize != 0) {				\
+		res = (int *)(CALL)->ret;			\
+	switch((CALL)->retsize) {				\
+	case 2:							\
+	  if ((CALL)->rettype == 'D')				\
+	    *(double*)res = f0d;				\
+	  else {						\
+		res[1] = d1;					\
+		res[0] = d0;					\
+	  }							\
+	  break;						\
+	case 1:							\
+	  if ((CALL)->rettype == 'F')				\
+	    *(double*)res = f0f;				\
+	  else							\
+		res[0] = d0;					\
+	  break;						\
+	}							\
+	}							\
+} while (0)
 
 #endif /* __m68k_linux_md_h */
-




More information about the kaffe mailing list