From: <mic...@us...> - 2007-08-24 17:51:44
|
Revision: 173 http://pearcolator.svn.sourceforge.net/pearcolator/?rev=173&view=rev Author: michael_baer Date: 2007-08-24 10:51:46 -0700 (Fri, 24 Aug 2007) Log Message: ----------- - Missing from last commit Modified Paths: -------------- src/org/binarytranslator/DBT_Options.java src/org/binarytranslator/Main.java src/org/binarytranslator/generic/decoder/CodeTranslator.java src/org/binarytranslator/generic/memory/CallBasedMemory.java src/org/binarytranslator/generic/memory/IntAddressedLittleEndianMemory.java Modified: src/org/binarytranslator/DBT_Options.java =================================================================== --- src/org/binarytranslator/DBT_Options.java 2007-08-24 17:08:31 UTC (rev 172) +++ src/org/binarytranslator/DBT_Options.java 2007-08-24 17:51:46 UTC (rev 173) @@ -310,7 +310,7 @@ input = input.substring(pos + 1); } - if (input.length() > 1) { + if (input.length() >= 1) { state.onText(input); } } Modified: src/org/binarytranslator/Main.java =================================================================== --- src/org/binarytranslator/Main.java 2007-08-24 17:08:31 UTC (rev 172) +++ src/org/binarytranslator/Main.java 2007-08-24 17:51:46 UTC (rev 173) @@ -86,6 +86,10 @@ return; } + if (DBT_Options.buildForSunVM) { + System.err.println("WARNING: This build was done for the SUN JVM and does only support interpretation, but not binary translation. Set DBT_Options.buildForSunVM to false to build for the Jikes RVM."); + } + if (DBT.VerifyAssertions) { System.err.println("WARNING: Assertions are enabled."); } Modified: src/org/binarytranslator/generic/decoder/CodeTranslator.java =================================================================== --- src/org/binarytranslator/generic/decoder/CodeTranslator.java 2007-08-24 17:08:31 UTC (rev 172) +++ src/org/binarytranslator/generic/decoder/CodeTranslator.java 2007-08-24 17:51:46 UTC (rev 173) @@ -765,7 +765,7 @@ * supposedly a CALL or RETURN */ - boolean decision = DBT_Options.singleInstrTranslation == false && jump.type == BranchType.DIRECT_BRANCH && !shallTraceStop(); + boolean decision = DBT_Options.singleInstrTranslation == false && !shallTraceStop(); if (!decision) { @@ -778,10 +778,14 @@ return false; } - //only query the code cache if we have to - DBT_Trace compiledTrace = ps.codeCache.tryGet(targetPc); - decision = (compiledTrace == null || compiledTrace.getNumberOfInstructions() < 20) ; + decision = jump.type == BranchType.DIRECT_BRANCH; + if (!decision) { + //only query the code cache if we have to + DBT_Trace compiledTrace = ps.codeCache.tryGet(targetPc); + decision = (compiledTrace != null && compiledTrace.getNumberOfInstructions() < 30); + } + if (DBT_Options.debugBranchResolution) { String text = (!decision ? "Not inlining " : "Inlining "); text += jump.type + " to 0x" + Integer.toHexString(targetPc); Modified: src/org/binarytranslator/generic/memory/CallBasedMemory.java =================================================================== --- src/org/binarytranslator/generic/memory/CallBasedMemory.java 2007-08-24 17:08:31 UTC (rev 172) +++ src/org/binarytranslator/generic/memory/CallBasedMemory.java 2007-08-24 17:51:46 UTC (rev 173) @@ -104,12 +104,12 @@ /** * The generation context we're translating within */ - private OPT_GenerationContext gc; + protected OPT_GenerationContext gc; /** * Register that references the memory object */ - OPT_Register memory; + protected OPT_Register memory; /** * Constructor @@ -158,7 +158,7 @@ } /** - * Generate memory prologue,... for the beignning of a trace. e.g. Loading the + * Generate memory prologue,... for the beginning of a trace. e.g. Loading the * page table into a register */ public void initTranslate(CodeTranslator helper) { @@ -202,8 +202,7 @@ if (DBT_Options.inlineCallbasedMemory) { translator.appendInlinedCall(s); } - else - { + else { s.position = gc.inlineSequence; s.bcIndex = bcIndex; translator.appendInstruction(s); @@ -395,45 +394,6 @@ } /** - * Generate the IR code for a byte store - * - * @param src - * the register that holds the value to store - * @param addr - * the address of the value to store - */ - public void translateCallBasedStore8(OPT_Operand addr, - OPT_RegisterOperand src) { - translateStore(store8, DBT_Trace.MEMORY_STORE8, addr, src); - } - - /** - * Generate the IR code for a 16bit store - * - * @param src - * the register that holds the value to store - * @param addr - * the address of the value to store - */ - public void translateCallBasedStore16(OPT_Operand addr, - OPT_RegisterOperand src) { - translateStore(store16, DBT_Trace.MEMORY_STORE16, addr, src); - } - - /** - * Generate the IR code for a 32bit store - * - * @param src - * the register that holds the value to store - * @param addr - * the address of the value to store - */ - public void translateCallBasedStore32(OPT_Operand addr, - OPT_RegisterOperand src) { - translateStore(store32, DBT_Trace.MEMORY_STORE32, addr, src); - } - - /** * Get method reference if linking a call * * @param callAddress Modified: src/org/binarytranslator/generic/memory/IntAddressedLittleEndianMemory.java =================================================================== --- src/org/binarytranslator/generic/memory/IntAddressedLittleEndianMemory.java 2007-08-24 17:08:31 UTC (rev 172) +++ src/org/binarytranslator/generic/memory/IntAddressedLittleEndianMemory.java 2007-08-24 17:51:46 UTC (rev 173) @@ -87,7 +87,7 @@ * Return the offset part of the address */ @Inline - protected int getOffset(int address) { + private static final int getOffset(int address) { return (address & (PAGE_SIZE - 1)) >>> 2; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |