From: <no...@so...> - 2002-09-10 17:40:02
|
Bugs item #607368, was opened at 2002-09-10 11:48 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105523&aid=607368&group_id=5523 Category: Execution Problem Group: SableVM Status: Closed Resolution: Fixed Priority: 7 Submitted By: Nobody/Anonymous (nobody) Assigned to: Etienne M. Gagnon (egagnon) Summary: bug in >>> operator? Initial Comment: I'm using the 1.0.3 version of sablevm, and it's associated classpath. The >>>= and >>> operators appear to be broken strangely. Demo class and output: =================================================== import java.lang.*; import java.awt.color.*; import java.awt.image.*; public class ShiftBug { public static void main (String argv[]) { long a = 0xff00; long b, c; b = a >>> 4; c = 0xff00 >>> 4; System.out.print (Long.toString(b,16) + " " + Long.toString(c,16) + "\n"); } } =================================================== Output: [esnyder@basalt esnyder]$ jikes -classpath /usr/local/lib/sablevm/classes-1.0.3 ShiftBug.java [esnyder@basalt esnyder]$ sablevm -Y ShiftBug ff000 ff0 thanks, -emile ---------------------------------------------------------------------- >Comment By: Etienne M. Gagnon (egagnon) Date: 2002-09-10 13:40 Message: Logged In: YES user_id=15365 Fixed in CVS. Thanks! - Etienne ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2002-09-10 12:56 Message: Logged In: NO I believe it's just a typo in sablevm-1.0.3/src/libsablevm/instructions.m4.c If I change line 1477 (in the LUSR block) from *((jlong *) &stack[stack_size - 2]) = ((_svmt_u64) value1) << (value2 & 0x3f); <---- line 1477 to *((jlong *) &stack[stack_size - 2]) = ((_svmt_u64) value1) >> (value2 & 0x3f); <---- line 1477 Then the test program works correctly. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105523&aid=607368&group_id=5523 |