projects
/
nestedvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clarify licensing
[nestedvm.git]
/
src
/
org
/
ibex
/
nestedvm
/
JavaSourceCompiler.java
diff --git
a/src/org/ibex/nestedvm/JavaSourceCompiler.java
b/src/org/ibex/nestedvm/JavaSourceCompiler.java
index
103cfa1
..
d231f94
100644
(file)
--- a/
src/org/ibex/nestedvm/JavaSourceCompiler.java
+++ b/
src/org/ibex/nestedvm/JavaSourceCompiler.java
@@
-1,3
+1,7
@@
+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the Apache License 2.0 ("the License").
+// You may not use this file except in compliance with the License.
+
package org.ibex.nestedvm;
import java.util.*;
package org.ibex.nestedvm;
import java.util.*;
@@
-33,6
+37,7
@@
public class JavaSourceCompiler extends Compiler {
}
protected void _go() throws Exn, IOException {
}
protected void _go() throws Exn, IOException {
+ if(singleFloat) throw new Exn("JavaSourceCompiler doesn't support singleFloat");
String packageName;
String className;
if (fullClassName.indexOf('.') != -1) {
String packageName;
String className;
if (fullClassName.indexOf('.') != -1) {
@@
-217,7
+222,7
@@
public class JavaSourceCompiler extends Compiler {
private void endMethod() { endMethod(endOfMethod); }
private void endMethod(int lastAddr) {
if(startOfMethod == 0) return;
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++;
// This isn't strictly necessary; its just here to work around unreachable code errors
p("case " + toHex(lastAddr) + ":");
indent++;
@@
-285,7
+290,7
@@
public class JavaSourceCompiler extends Compiler {
insn = nextInsn;
nextInsn = (i == count-1) ? -1 : dis.readInt();
if(addr >= endOfMethod) { endMethod(); startMethod(addr); }
insn = nextInsn;
nextInsn = (i == count-1) ? -1 : dis.readInt();
if(addr >= endOfMethod) { endMethod(); startMethod(addr); }
- if(jumpableAddresses==null || addr == startOfMethod || jumpableAddresses.contains(new Integer(addr))) {
+ if(jumpableAddresses==null || addr == startOfMethod || jumpableAddresses.get(new Integer(addr)) != null) {
p("case " + toHex(addr) + ":");
unreachable = false;
} else if(unreachable) {
p("case " + toHex(addr) + ":");
unreachable = false;
} else if(unreachable) {
@@
-422,6
+427,7
@@
public class JavaSourceCompiler extends Compiler {
break;
case 13: // BREAK
p( "throw new ExecutionException(\"Break\");");
break;
case 13: // BREAK
p( "throw new ExecutionException(\"Break\");");
+ unreachable = true;
break;
case 16: // MFHI
p( "r"+rd+" = hi;");
break;
case 16: // MFHI
p( "r"+rd+" = hi;");
@@
-919,4
+925,4
@@
public class JavaSourceCompiler extends Compiler {
"f"+(r+1)+" = (int)(l >>> 32); f"+r+" = (int)l; }";
}
}
"f"+(r+1)+" = (int)(l >>> 32); f"+r+" = (int)l; }";
}
}
-
\ No newline at end of file
+