[kaffe] CVS kaffe (robilad): Fixed getstatic for short constants

Kaffe CVS cvs-commits at kaffe.org
Fri Mar 25 21:19:25 PST 2005


PatchSet 5609 
Date: 2005/03/26 05:13:53
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Fixed getstatic for short constants

2005-03-25  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/kaffe.def: (GETSTATIC) Cast
        short constants to jshort before moving them.

        Reported by:  Daniel Bonniot  <Daniel.Bonniot at inria.fr>

Members: 
	ChangeLog:1.3781->1.3782 
	kaffe/kaffevm/kaffe.def:1.37->1.38 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3781 kaffe/ChangeLog:1.3782
--- kaffe/ChangeLog:1.3781	Sat Mar 26 04:38:07 2005
+++ kaffe/ChangeLog	Sat Mar 26 05:13:53 2005
@@ -1,5 +1,12 @@
 2005-03-25  Dalibor Topic  <robilad at kaffe.org>
 
+	* kaffe/kaffevm/kaffe.def: (GETSTATIC) Cast
+	short constants to jshort before moving them.
+
+	Reported by:  Daniel Bonniot  <Daniel.Bonniot at inria.fr>
+
+2005-03-25  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/clib/nio/gnu_java_nio_VMSelector.c:
 	Include <sys/types.h> to fix build on OS X.
 
Index: kaffe/kaffe/kaffevm/kaffe.def
diff -u kaffe/kaffe/kaffevm/kaffe.def:1.37 kaffe/kaffe/kaffevm/kaffe.def:1.38
--- kaffe/kaffe/kaffevm/kaffe.def:1.37	Tue Dec 21 05:49:59 2004
+++ kaffe/kaffe/kaffevm/kaffe.def	Sat Mar 26 05:13:58 2005
@@ -2272,7 +2272,7 @@
 	case 'S':
 		push(1);
 		if (FIELD_IS_CONSTANT()) {
-			move_int_const(stack(0), *(jint *)FIELD_ADDRESS(field_field()));
+			move_int_const(stack(0), *(jshort *)FIELD_ADDRESS(field_field()));
 		} else {
 			load_addr_short(stack(0), FIELD_ADDRESS(field_field()));
 		}




More information about the kaffe mailing list