+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the Apache Public Source License 2.0 ("the License").
+// You may not use this file except in compliance with the License.
+
package org.ibex.nestedvm;
import java.util.*;
}
protected void _go() throws Exn, IOException {
+ if(singleFloat) throw new Exn("JavaSourceCompiler doesn't support singleFloat");
String packageName;
String className;
if (fullClassName.indexOf('.') != -1) {
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++;
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) + ";");
if(pc == -1) throw new Error("pc modifying insn in delay slot");
int target = (pc&0xf0000000)|(jumpTarget << 2);
emitInstruction(-1,nextInsn,-1);
- if(optimizedMemcpy && (target == memcpy || target == memset)) {
- if(target == memcpy)
- p("memcpy(r4,r5,r6);");
- else if(target == memset)
- p("memset(r4,r5,r6);");
- p("r2 = r4;");
- branch(pc,pc+8);
- } else {
- p("r" + RA + "=" + constant(pc+8 /*skip this insn and delay slot*/) + ";");
- branch(pc, target);
- }
+ p("r" + RA + "=" + constant(pc+8 /*skip this insn and delay slot*/) + ";");
+ branch(pc, target);
unreachable = true;
break;
}
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+";");
"f"+(r+1)+" = (int)(l >>> 32); f"+r+" = (int)l; }";
}
}
-
\ No newline at end of file
+