X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fnestedvm%2FCompiler.java;h=68d2dee97da005d1c3f5b61380b36c55e4ec6042;hb=c59b7cfc7a6b67574d38c5c8eb7732bad37236b0;hp=de5a04802da8c4174e96345c5027a9b929731da5;hpb=c2b2704764af1ade923ba8f15d517b87f9d16189;p=nestedvm.git diff --git a/src/org/ibex/nestedvm/Compiler.java b/src/org/ibex/nestedvm/Compiler.java index de5a048..68d2dee 100644 --- a/src/org/ibex/nestedvm/Compiler.java +++ b/src/org/ibex/nestedvm/Compiler.java @@ -7,6 +7,8 @@ import java.io.*; import org.ibex.nestedvm.util.*; +// FEATURE: -d option for classfilecompiler (just like javac's -d) + public abstract class Compiler implements Registers { /** The ELF binary being read */ protected ELF elf; @@ -77,11 +79,8 @@ public abstract class Compiler implements Registers { protected boolean onePage; protected void pageSizeInit() throws Exn { - try { - Runtime.checkPageSize(pageSize,totalPages); - } catch(IllegalArgumentException e) { - throw new Exn(e.getMessage()); - } + if((pageSize&(pageSize-1)) != 0) throw new Exn("pageSize not a multiple of two"); + if((totalPages&(totalPages-1)) != 0) throw new Exn("totalPages not a multiple of two"); while(pageSize>>>pageShift != 1) pageShift++; }