[kaffe] CVS kaffe (dalibor): Added missing files

Kaffe CVS cvs-commits at kaffe.org
Fri Dec 12 11:24:02 PST 2003


PatchSet 4221 
Date: 2003/12/12 19:09:02
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Added missing files

Members: 
	config/parisc/sysdepCallMethod.h:INITIAL->1.1 

===================================================================
Checking out kaffe/config/parisc/sysdepCallMethod.h
RCS:  /home/cvs/kaffe/kaffe/config/parisc/sysdepCallMethod.h,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/parisc/sysdepCallMethod.h	Fri Dec 12 19:11:32 2003
@@ -0,0 +1,70 @@
+/*
+ * parisc/sysdepCallMethod.h
+ * Common configuration information for PA-RISC based machines.
+ *
+ * Copyright (c) 1996, 1997, 1998
+ *      Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * Copyright (c) 2003
+ *      Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ *
+ * sysdepCallMethod is written by Pavel Roskin <pavel_roskin at geocities.com>
+ */
+
+#ifndef __parisc_sysdepCallMethod_h
+#define __parisc_sysdepCallMethod_h
+
+#include "support.h"
+
+typedef jdouble d4int_f (int, int, int, int);
+typedef jfloat f4int_f (int, int, int, int);
+typedef jlong j4int_f (int, int, int, int);
+
+#if NEED_sysdepCallMethod
+/* FIXME: this doesn't work for parisc-linux, because on parisc-linux
+ * there is no fparg relocation, so we cannot just pass everything in
+ * general purpose registers
+ */
+
+static inline void sysdepCallMethod(callMethodInfo *call)
+{
+  int argidx;
+  int *sa;
+  int *stackx;
+  int st_reserve[(call)->nrargs];
+  asm volatile ("ldo -36(%%r30),%0" : "=r" (sa) : "r" (st_reserve));
+  for (argidx = 0, stackx = sa; argidx < (call)->nrargs; argidx++)
+    switch ((call)->callsize[argidx])
+      {
+      case 1:
+	*stackx-- = (call)->args[argidx].i;
+	break;
+      case 2:
+	if (!((int)stackx & 4)) stackx--;
+	*stackx-- = (int) ((call)->args[argidx].j);
+	*stackx-- = (call)->args[argidx].i;
+	argidx++;
+      default:
+	break;
+      }
+  if ((call)->rettype == 'F') {
+    (call)->ret->f =
+      ((f4int_f *) ((call)->function)) (sa[0], sa[-1], sa[-2], sa[-3]);
+    break;
+  }
+  if ((call)->rettype == 'D') {
+    (call)->ret->d =
+      ((d4int_f *) ((call)->function)) (sa[0], sa[-1], sa[-2], sa[-3]);
+    break;
+  }
+  (call)->ret->j =
+    ((j4int_f *) ((call)->function)) (sa[0], sa[-1], sa[-2], sa[-3]);
+}
+
+#endif /* NEED_sysdepCallMethod */
+
+#endif /* __parisc_sysdepCallMethod_h */
+




More information about the kaffe mailing list