X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fnestedvm%2FJavaSourceCompiler.java;h=596e15fb78c1535ddfc417e2e9c10900622966c2;hb=7a9bc0ba0fd215bd5b9a2e370937d81870aadba5;hp=a983b583b29cf686723235d2d3d258d8ace9a385;hpb=98f786ce8ee1fcd9568d1c367160851d32e1c786;p=nestedvm.git diff --git a/src/org/ibex/nestedvm/JavaSourceCompiler.java b/src/org/ibex/nestedvm/JavaSourceCompiler.java index a983b58..596e15f 100644 --- a/src/org/ibex/nestedvm/JavaSourceCompiler.java +++ b/src/org/ibex/nestedvm/JavaSourceCompiler.java @@ -33,6 +33,7 @@ public class JavaSourceCompiler extends Compiler { } protected void _go() throws Exn, IOException { + if(singleFloat) throw new Exn("JavaSourceCompiler doesn't support singleFloat"); String packageName; String className; if (fullClassName.indexOf('.') != -1) { @@ -217,7 +218,7 @@ public class JavaSourceCompiler extends Compiler { private void endMethod() { endMethod(endOfMethod); } private void endMethod(int lastAddr) { if(startOfMethod == 0) return; - // FEATURE: We should be able to use if(!unreachable) here (i think) + // We should be able to use if(!unreachable) here (i think) // This isn't strictly necessary; its just here to work around unreachable code errors p("case " + toHex(lastAddr) + ":"); indent++; @@ -412,7 +413,7 @@ public class JavaSourceCompiler extends Compiler { break; case 12: // SYSCALL p("pc = " + toHex(pc) + ";"); - p( "r"+V0+" = syscall(r"+V0+",r"+A0+",r"+A1+",r"+A2+",r"+A3+");"); + p( "r"+V0+" = syscall(r"+V0+",r"+A0+",r"+A1+",r"+A2+",r"+A3+",r"+T0+",r"+T1+");"); p("if (state != RUNNING) {"); indent++; p("pc = " + toHex(pc+4) + ";"); @@ -600,7 +601,7 @@ public class JavaSourceCompiler extends Compiler { p( "r"+rt+" = r"+rs+" < "+signedImmediate+" ? 1 : 0;"); break; case 11: // SLTIU - p( "r"+rt+" = (r"+rs+"&0xffffffffL) < ("+unsignedImmediate+"&0xffffffffL) ? 1 : 0;"); + p( "r"+rt+" = (r"+rs+"&0xffffffffL) < ("+signedImmediate+"&0xffffffffL) ? 1 : 0;"); break; case 12: // ANDI p( "r"+rt+" = r"+rs+" & "+unsignedImmediate+";");