+// 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.
+
// Copyright 2003 Brian Alliet
// Based on org.xwt.imp.MIPS by Adam Megacz
// Portions Copyright 2003 Adam Megacz
continue OUTER;
case 12: // SYSCALL
this.pc = pc;
- r[V0] = syscall(r[V0],r[A0],r[A1],r[A2],r[A3]);
+ r[V0] = syscall(r[V0],r[A0],r[A1],r[A2],r[A3],r[T0],r[T1]);
if(state != RUNNING) { this.pc = nextPC; break OUTER; }
break;
case 13: // BREAK
ELF elf = new ELF(data);
symtab = elf.getSymtab();
- if(elf.header.type != ELF.ELFHeader.ET_EXEC) throw new IOException("Binary is not an executable");
- if(elf.header.machine != ELF.ELFHeader.EM_MIPS) throw new IOException("Binary is not for the MIPS I Architecture");
- if(elf.ident.data != ELF.ELFIdent.ELFDATA2MSB) throw new IOException("Binary is not big endian");
+ if(elf.header.type != ELF.ET_EXEC) throw new IOException("Binary is not an executable");
+ if(elf.header.machine != ELF.EM_MIPS) throw new IOException("Binary is not for the MIPS I Architecture");
+ if(elf.ident.data != ELF.ELFDATA2MSB) throw new IOException("Binary is not big endian");
entryPoint = elf.header.entry;
int pageWords = (1<<pageShift) >> 2;
for(int i=0;i<pheaders.length;i++) {
ELF.PHeader ph = pheaders[i];
- if(ph.type != ELF.PHeader.PT_LOAD) continue;
+ if(ph.type != ELF.PT_LOAD) continue;
int memsize = ph.memsz;
int filesize = ph.filesz;
if(memsize == 0) continue;