From: <mic...@us...> - 2007-06-20 13:53:32
|
Revision: 139 http://svn.sourceforge.net/pearcolator/?rev=139&view=rev Author: michael_baer Date: 2007-06-20 06:53:32 -0700 (Wed, 20 Jun 2007) Log Message: ----------- - Added missing .copy() calls within AbstractCodeTranslator - Removed unused options from DBT_Options Modified Paths: -------------- src/org/binarytranslator/DBT_Options.java src/org/binarytranslator/Main.java src/org/binarytranslator/generic/decoder/AbstractCodeTranslator.java Modified: src/org/binarytranslator/DBT_Options.java =================================================================== --- src/org/binarytranslator/DBT_Options.java 2007-06-20 13:25:36 UTC (rev 138) +++ src/org/binarytranslator/DBT_Options.java 2007-06-20 13:53:32 UTC (rev 139) @@ -19,7 +19,7 @@ public class DBT_Options { /** Remove features that will only work on jikes? */ - public final static boolean buildForSunVM = true; + public final static boolean buildForSunVM = false; /** Enable the profiling of application during interpretation? */ public final static boolean profileDuringInterpretation = true; @@ -36,9 +36,6 @@ /** Arguments given to the executable.*/ public static String[] executableArguments = null; - /** The initial optimisation level */ - public static int initialOptLevel = 0; - /** Instructions to translate for an optimisation level 0 trace */ public static int instrOpt0 = 684; @@ -61,32 +58,16 @@ /** Should direct branches be resolved before dynamic branches? */ public static boolean resolveDirectBranchesFirst = true; - /** - * Use global branch information rather than local (within the trace) - * information when optimisation level is greater than or equal to this value - */ - public static int globalBranchLevel = 3; - - /** - * Set this to true to translate only one instruction at a time. - */ + /** Set this to true to translate only one instruction at a time. */ public static boolean singleInstrTranslation = false; - /** - * Eliminate unneeded filling of register - */ + /** Eliminate unneeded filling of register */ public final static boolean eliminateRegisterFills = true; - // -oO Translation debugging options Oo- - - /** - * Print dissassembly of translated instructions. - */ + /** Print dissassembly of translated instructions. */ public static boolean debugInstr = true; - /** - * Print information about the lazy resolution of branch addresses... - */ + /** Print information about the lazy resolution of branch addresses...*/ public static boolean debugBranchResolution = true; /** During code translation, print information about the creation of basic blocks. */ @@ -113,12 +94,6 @@ /** Print out messages from the memory system */ public static boolean debugMemory = false; - /** Print out process space between instructions */ - public final static boolean debugPS = false; - - /** When printing process space, omit floating point registers. */ - public final static boolean debugPS_OmitFP = false; - /** The user ID for the user running the command */ public final static int UID = 1000; @@ -180,10 +155,6 @@ debugSyscall = Boolean.parseBoolean(value); } else if (arg.equalsIgnoreCase("-X:dbt:debugSyscallMore")) { debugSyscallMore = Boolean.parseBoolean(value); - } else if (arg.equalsIgnoreCase("-X:dbt:globalBranchLevel")) { - globalBranchLevel = Integer.parseInt(value); - } else if (arg.equalsIgnoreCase("-X:dbt:initialOptLevel")) { - initialOptLevel = Integer.parseInt(value); } else if (arg.equalsIgnoreCase("-X:dbt:instrOpt0")) { instrOpt0 = Integer.parseInt(value); } else if (arg.equalsIgnoreCase("-X:dbt:instrOpt1")) { Modified: src/org/binarytranslator/Main.java =================================================================== --- src/org/binarytranslator/Main.java 2007-06-20 13:25:36 UTC (rev 138) +++ src/org/binarytranslator/Main.java 2007-06-20 13:53:32 UTC (rev 139) @@ -99,7 +99,7 @@ report("Sucessfully created process."); - if (DBT_Options.debugPS) { + if (DBT_Options.debugRuntime) { System.out.println("***** INITIAL PROCESS SPACE *****\n"); System.out.println(ps); } Modified: src/org/binarytranslator/generic/decoder/AbstractCodeTranslator.java =================================================================== --- src/org/binarytranslator/generic/decoder/AbstractCodeTranslator.java 2007-06-20 13:25:36 UTC (rev 138) +++ src/org/binarytranslator/generic/decoder/AbstractCodeTranslator.java 2007-06-20 13:53:32 UTC (rev 139) @@ -661,7 +661,7 @@ OPT_BasicBlock fallThrough = createBlockAfterCurrent(); OPT_Instruction switchInstr; - switchInstr = LookupSwitch.create(LOOKUPSWITCH, targetAddress, null, null, fallThrough.makeJumpTarget(), null, 0); + switchInstr = LookupSwitch.create(LOOKUPSWITCH, targetAddress.copyRO(), null, null, fallThrough.makeJumpTarget(), null, 0); appendInstruction(switchInstr); UnresolvedJumpInstruction unresolvedInfo = new UnresolvedJumpInstruction(switchInstr, (Laziness)lazyStateAtJump.clone(), currentPC, branchType); @@ -669,7 +669,7 @@ setCurrentBlock(fallThrough); appendRecordUncaughtBranch(currentPC, targetAddress.copyRO(), branchType, retAddr); - appendTraceExit((Laziness) lazyStateAtJump.clone(), targetAddress.copyRO()); + appendTraceExit((Laziness) lazyStateAtJump.clone(), targetAddress); } @@ -855,7 +855,7 @@ // Copy the value into the register specified by gc.resultReg. appendInstruction(Move.create(INT_MOVE, new OPT_RegisterOperand( - gc.resultReg, VM_TypeReference.Int), nextPc)); + gc.resultReg, VM_TypeReference.Int), nextPc.copy())); resolveLaziness(laziness); appendInstruction(Goto.create(GOTO, finishBlock.makeJumpTarget())); currentBlock.deleteNormalOut(); @@ -1086,7 +1086,7 @@ Call.setParam(s, 0, psRef); // Reference to ps, sets 'this' pointer Call.setParam(s, 1, new OPT_IntConstantOperand(pc)); // Address of branch // instruction - Call.setParam(s, 2, destination); // Destination of branch value + Call.setParam(s, 2, destination.copy()); // Destination of branch value Call.setParam(s, 3, new OPT_IntConstantOperand(branchType.ordinal())); // Branch type Call.setParam(s, 4, new OPT_IntConstantOperand(retAddr)); // return address // value This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |