I wasn't able to reopen the existing bug entry #2935586 but I'm having the same issue as explained in the this report. Maybe you might want to merge the issues.
I'm using an InSys MoRoS device running a JamVM in a Sandbox with the latest JamVM 1.5.4.
Actually, the bug appeared when doing the following
Long.toInt(-1);
This throws an ArrayIndexOutOfBoundsException.
I checked the Long source code from GNU classpath and traced it down to same problem with the unary minus.
I tries something like this:
test = -1;
if(test < 0) System.out.println("Negative");
test = -test;
if(test < 0) System.out.println("Still negative");
On this device, it is "Still negative",
Currently, I use a pre-compiled sandbox image from InSys and I cannot try the compiler options metioned in the previous bug report comments. But i tried the "jamvm -Xnoinlining ..." option and I can confirm that this does not solve the issue.
Below, you will find the detailed CPU spec and the VM version info if it helps.
-------------------------------------
Sandbox /home/user/rialto $ cat /proc/cpuinfo
Processor : ARM922T rev 0 (v4l)
BogoMIPS : 62.25
Features : swp half
CPU implementer : 0x41
CPU architecture: 4T
CPU variant : 0x0
CPU part : 0x922
CPU revision : 0
Cache type : write-back
Cache clean : cp15 c7 ops
Cache lockdown : format A
Cache format : Harvard
I size : 8192
I assoc : 64
I line length : 32
I sets : 4
D size : 8192
D assoc : 64
D line length : 32
D sets : 4
Hardware : INSYS/MoRoS
Revision : 0000
Serial : 0000000000000000
Sandbox /home/user/rialto $ java -version
java version "1.5.0"
JamVM version 1.5.4
Copyright (C) 2003-2010 Robert Lougher