[Nestedvm] translating nasm
Levente Santha
lsantha at kn.ro
Tue Feb 24 16:24:42 EST 2009
Hi,
I've translated nasm 0.98.39 (from these sources
https://sourceforge.net/project/showfiles.php?group_id=6208&package_id=44298ated)
with NestedVM.
The translation appeared to be successful, both nasm and ndisasm starts up
and show the commandline options. Ndisasm also appears to be working fine.
However when I try to run nasm on a valid ASM source I get this exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 65536
at nasm.run_86e00(nasm.java)
at nasm.run_17200(nasm.java:11372)
at nasm.trampoline(nasm.java)
at nasm._execute(nasm.java)
at org.ibex.nestedvm.Runtime.__execute(Runtime.java:506)
at org.ibex.nestedvm.Runtime.execute(Runtime.java:523)
at org.ibex.nestedvm.Runtime.run(Runtime.java:545)
at org.ibex.nestedvm.Runtime.run(Runtime.java:538)
at org.ibex.nestedvm.Runtime.run(Runtime.java:537)
at nasm.main(nasm.java)
I compiled it with:
java org.ibex.nestedvm.Compiler -outfile nasm.java -outformat java nasm nasm
When I compile it with:
java org.ibex.nestedvm.Compiler -outfile nasm.java -outformat java -o
totalPages=131072 nasm nasm
I get this exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 131072
at nasm.run_86e00(nasm.java)
at nasm.run_17200(nasm.java:11372)
at nasm.trampoline(nasm.java)
at nasm._execute(nasm.java)
at org.ibex.nestedvm.Runtime.__execute(Runtime.java:506)
at org.ibex.nestedvm.Runtime.execute(Runtime.java:523)
at org.ibex.nestedvm.Runtime.run(Runtime.java:545)
at org.ibex.nestedvm.Runtime.run(Runtime.java:538)
at org.ibex.nestedvm.Runtime.run(Runtime.java:537)
at nasm.main(nasm.java)
My guess is that some kind of internal limit of nestedvm is violated but I
don't have further ideas yet.
I noted that the value in the exception equals to the totalPages (defult
or explicit). If I increase totalPages very much the resulting class needs
too much memory on the jvm to run, so that is not a solution.
The size of the nasm MIPS binary is 1374793 bytes.
Can someone help me with this?
Thank you in advance,
Levente Santha
More information about the Nestedvm
mailing list