X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fmips%2FJavaSourceCompiler.java;h=85295e60713055dc4b6bdaba73acd6da43258d51;hp=5bf7e5df0d49654aeeab2ab8f2b9cb7b7c2797d5;hb=e66ecb6291d5d0f99bf48c9d56ceabb92c958bc2;hpb=e1c93788e00ec4b8232044893d6c9cd0a1173cfe diff --git a/src/org/xwt/mips/JavaSourceCompiler.java b/src/org/xwt/mips/JavaSourceCompiler.java index 5bf7e5d..85295e6 100644 --- a/src/org/xwt/mips/JavaSourceCompiler.java +++ b/src/org/xwt/mips/JavaSourceCompiler.java @@ -104,6 +104,7 @@ public class JavaSourceCompiler extends Compiler { p("while(state == RUNNING) {"); indent++; p("switch(pc>>>" + methodShift+ ") {"); + //p("switch(pc&" + toHex(methodMask) + ") {"); indent++; pblock(runs); p("default: throw new ExecutionException(\"invalid address 0x\" + Long.toString(this.pc&0xffffffffL,16) + \": r2: \" + r2);"); @@ -207,6 +208,8 @@ public class JavaSourceCompiler extends Compiler { endOfMethod = addr + maxBytesPerMethod; String methodName = "run_" + Long.toString(addr & 0xffffffffL, 16); runs.append(indents[4] + "case " + toHex(addr>>>methodShift) + ": " + methodName + "(); break; \n"); + //runs.append(indents[4] + "case " + toHex(addr&methodMask) + ": " + methodName + "(); break; \n"); + p("private final void " + methodName + "() throws ExecutionException { /"+"* " + toHex(addr) + " - " + toHex(endOfMethod) + " *" + "/"); indent++; p("int addr, tmp;");