[kaffe] CVS kaffe (guilhem): Fix for sparc/sysdepCallMethod: cast the return argument to the right type.
Kaffe CVS
cvs-commits at kaffe.org
Thu Aug 26 03:14:25 PDT 2004
PatchSet 5108
Date: 2004/08/26 10:10:44
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
Fix for sparc/sysdepCallMethod: cast the return argument to the right type.
* config/sparc/sysdepCallMethod.h:
Cast correctly the return argument to the right type.
Members:
ChangeLog:1.2664->1.2665
config/sparc/sysdepCallMethod.h:1.3->1.4
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2664 kaffe/ChangeLog:1.2665
--- kaffe/ChangeLog:1.2664 Thu Aug 26 08:16:55 2004
+++ kaffe/ChangeLog Thu Aug 26 10:10:44 2004
@@ -1,5 +1,10 @@
2004-08-26 Guilhem Lavaux <guilhem at kaffe.org>
+ * config/sparc/sysdepCallMethod.h:
+ Cast correctly the return argument to the right type.
+
+2004-08-26 Guilhem Lavaux <guilhem at kaffe.org>
+
* test/regression/compiler/InnerTest1_A.java,
test/regression/compiler/InnerTest1_B.java:
New test for KJC.
Index: kaffe/config/sparc/sysdepCallMethod.h
diff -u kaffe/config/sparc/sysdepCallMethod.h:1.3 kaffe/config/sparc/sysdepCallMethod.h:1.4
--- kaffe/config/sparc/sysdepCallMethod.h:1.3 Sat Aug 21 15:59:57 2004
+++ kaffe/config/sparc/sysdepCallMethod.h Thu Aug 26 10:10:46 2004
@@ -129,10 +129,23 @@
break;
case 1:
- if (call->rettype == 'F')
+ switch(call->rettype) {
+ case 'F':
call->ret->f = ((jfloat (*)(ARG_TYPES))(func))(ARG_LIST);
- else /* Must be 32-bit or smaller int. */
+ break;
+ case 'Z':
+ case 'B':
+ call->ret->b = ((jint (*)(ARG_TYPES))(func))(ARG_LIST);
+ break;
+ case 'C':
+ case 'S':
+ call->ret->s = ((jint (*)(ARG_TYPES))(func))(ARG_LIST);
+ break;
+ default:
call->ret->i = ((jint (*)(ARG_TYPES))(func))(ARG_LIST);
+ break;
+ }
+
break;
default:
More information about the kaffe
mailing list