[kaffe] CVS kaffe (dalibor): Fixed compiler warning on sparc-netbsd

Kaffe CVS Kaffe Mailing List <kaffe@kaffe.org>
Wed Mar 24 07:48:04 2004


PatchSet 4565 
Date: 2004/03/24 15:44:09
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed compiler warning on sparc-netbsd

2004-03-24  Dalibor Topic <robilad@kaffe.org>

        * config/sparc/sysdepCallMethod.h
        (ARGS_DISPLACEMENT) Changed to 1 and inverted all
        operations on it in order to fix a compiler warning
        on netbsd-sparc.

Members: 
	ChangeLog:1.2143->1.2144 
	config/sparc/sysdepCallMethod.h:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2143 kaffe/ChangeLog:1.2144
--- kaffe/ChangeLog:1.2143	Wed Mar 24 11:06:09 2004
+++ kaffe/ChangeLog	Wed Mar 24 15:44:09 2004
@@ -1,5 +1,12 @@
 2004-03-24  Dalibor Topic <robilad@kaffe.org>
 
+	* config/sparc/sysdepCallMethod.h
+	(ARGS_DISPLACEMENT) Changed to 1 and inverted all
+	operations on it in order to fix a compiler warning
+	on netbsd-sparc.
+
+2004-03-24  Dalibor Topic <robilad@kaffe.org>
+
 	* config/alpha/atomicity.h:
 	New file, taken from GNU libc 2.3.2.
 
Index: kaffe/config/sparc/sysdepCallMethod.h
diff -u kaffe/config/sparc/sysdepCallMethod.h:1.1 kaffe/config/sparc/sysdepCallMethod.h:1.2
--- kaffe/config/sparc/sysdepCallMethod.h:1.1	Thu Apr 15 18:19:34 1999
+++ kaffe/config/sparc/sysdepCallMethod.h	Wed Mar 24 15:44:12 2004
@@ -41,7 +41,7 @@
 /* AG_DISPLACEMENT is the offset between the beginning of a
    variable-sized array, allocated in the stack, and the position of
    the first argument that can't be passed in a register.  */
-#define ARG_DISPLACEMENT -1
+#define ARG_DISPLACEMENT 1
 /* ARG_REG a case label and a statement that arranges for one argument
    to be passed. */
 #define ARG_REG(n) case n+1: a##n = callargs[n].i
@@ -64,7 +64,7 @@
   void *func = call->function;
   jvalue *callargs;
 #ifdef SYSDEP_ONE_VERSION
-  ARG_TYPE extraargs[((args>ARG_COUNT)?(args-ARG_COUNT-ARG_DISPLACEMENT):0)];
+  ARG_TYPE extraargs[((args>ARG_COUNT)?(args-ARG_COUNT+ARG_DISPLACEMENT):0)];
 #endif
 
   if (args == 0)
@@ -82,7 +82,7 @@
 static inline void
 longSysdepCallMethod(callMethodInfo *call,
 		     unsigned args, void *func, jvalue *callargs) {
-  ARG_TYPE extraargs[args-ARG_COUNT-ARG_DISPLACEMENT];
+  ARG_TYPE extraargs[args-ARG_COUNT+ARG_DISPLACEMENT];
 
   goto manyargs;
 #endif
@@ -102,7 +102,7 @@
   manyargs:
     {
       jvalue *last = &callargs[args];
-      ARG_TYPE *xargs = extraargs+ARG_DISPLACEMENT + args-ARG_COUNT;
+      ARG_TYPE *xargs = extraargs-ARG_DISPLACEMENT + args-ARG_COUNT;
       while (last != &callargs[ARG_COUNT])
 	*--xargs = (--last)->i;
     }