From: <mic...@us...> - 2007-04-01 12:27:50
|
Revision: 18 http://svn.sourceforge.net/pearcolator/?rev=18&view=rev Author: michael_baer Date: 2007-04-01 05:27:50 -0700 (Sun, 01 Apr 2007) Log Message: ----------- Changed Memory interface to enable loads and stores to constant memory addresses Modified Paths: -------------- src/org/binarytranslator/generic/memory/CallBasedMemory.java src/org/binarytranslator/generic/memory/Memory.java Modified: src/org/binarytranslator/generic/memory/CallBasedMemory.java =================================================================== --- src/org/binarytranslator/generic/memory/CallBasedMemory.java 2007-03-31 22:03:22 UTC (rev 17) +++ src/org/binarytranslator/generic/memory/CallBasedMemory.java 2007-04-01 12:27:50 UTC (rev 18) @@ -24,6 +24,7 @@ import org.jikesrvm.opt.ir.OPT_Instruction; import org.jikesrvm.opt.ir.OPT_LocationOperand; import org.jikesrvm.opt.ir.OPT_MethodOperand; +import org.jikesrvm.opt.ir.OPT_Operand; import org.jikesrvm.opt.ir.OPT_Operators; import org.jikesrvm.opt.ir.OPT_Register; import org.jikesrvm.opt.ir.OPT_RegisterOperand; @@ -185,7 +186,7 @@ * the address of the value to load */ private void translateLoad(VM_Method loadMethod, int bcIndex, - OPT_RegisterOperand addr, OPT_RegisterOperand dest) { + OPT_Operand addr, OPT_RegisterOperand dest) { OPT_Instruction s = Call.create(CALL, dest, null, null, null, 2); VM_MethodReference loadMethRef = loadMethod.getMemberRef() .asMethodReference(); @@ -212,7 +213,7 @@ * @param addr * the address of the value to load */ - public void translateLoadSigned8(OPT_RegisterOperand addr, + public void translateLoadSigned8(OPT_Operand addr, OPT_RegisterOperand dest) { translateLoad(loadS8, DBT_Trace.MEMORY_LOAD8, addr, dest); } @@ -226,7 +227,7 @@ * @param addr * the address of the value to load */ - public void translateLoadUnsigned8(OPT_RegisterOperand addr, + public void translateLoadUnsigned8(OPT_Operand addr, OPT_RegisterOperand dest) { translateLoad(loadU8, DBT_Trace.MEMORY_ULOAD8, addr, dest); } @@ -240,7 +241,7 @@ * @param addr * the address of the value to load */ - public void translateLoadSigned16(OPT_RegisterOperand addr, + public void translateLoadSigned16(OPT_Operand addr, OPT_RegisterOperand dest) { translateLoad(loadS16, DBT_Trace.MEMORY_LOAD16, addr, dest); } @@ -254,7 +255,7 @@ * @param addr * the address of the value to load */ - public void translateLoadUnsigned16(OPT_RegisterOperand addr, + public void translateLoadUnsigned16(OPT_Operand addr, OPT_RegisterOperand dest) { translateLoad(loadU16, DBT_Trace.MEMORY_ULOAD16, addr, dest); } @@ -267,7 +268,7 @@ * @param addr * the address of the value to load */ - public void translateLoad32(OPT_RegisterOperand addr, OPT_RegisterOperand dest) { + public void translateLoad32(OPT_Operand addr, OPT_RegisterOperand dest) { translateLoad(load32, DBT_Trace.MEMORY_LOAD32, addr, dest); } @@ -280,7 +281,7 @@ * @param addr * the address of the value to load */ - protected void translateCallBasedLoadSigned16(OPT_RegisterOperand addr, + protected void translateCallBasedLoadSigned16(OPT_Operand addr, OPT_RegisterOperand dest) { translateLoad(loadS16, DBT_Trace.MEMORY_LOAD16, addr, dest); } @@ -294,7 +295,7 @@ * @param addr * the address of the value to load */ - protected void translateCallBasedLoadUnsigned16(OPT_RegisterOperand addr, + protected void translateCallBasedLoadUnsigned16(OPT_Operand addr, OPT_RegisterOperand dest) { translateLoad(loadU16, DBT_Trace.MEMORY_ULOAD16, addr, dest); } @@ -307,7 +308,7 @@ * @param addr * the address of the value to load */ - protected void translateCallBasedLoad32(OPT_RegisterOperand addr, + protected void translateCallBasedLoad32(OPT_Operand addr, OPT_RegisterOperand dest) { translateLoad(load32, DBT_Trace.MEMORY_LOAD32, addr, dest); } @@ -326,7 +327,7 @@ * the address of the value to store */ private void translateStore(VM_Method storeMethod, int bcIndex, - OPT_RegisterOperand addr, OPT_RegisterOperand src) { + OPT_Operand addr, OPT_RegisterOperand src) { OPT_Instruction s = Call.create(CALL, null, null, null, null, 3); VM_MethodReference storeMethRef = storeMethod.getMemberRef() .asMethodReference(); @@ -352,7 +353,7 @@ * @param addr * the address of the value to store */ - public void translateStore8(OPT_RegisterOperand addr, OPT_RegisterOperand src) { + public void translateStore8(OPT_Operand addr, OPT_RegisterOperand src) { translateStore(store8, DBT_Trace.MEMORY_STORE8, addr, src); } @@ -364,7 +365,7 @@ * @param addr * the address of the value to store */ - public void translateStore16(OPT_RegisterOperand addr, OPT_RegisterOperand src) { + public void translateStore16(OPT_Operand addr, OPT_RegisterOperand src) { translateStore(store16, DBT_Trace.MEMORY_STORE16, addr, src); } @@ -376,7 +377,7 @@ * @param addr * the address of the value to store */ - public void translateStore32(OPT_RegisterOperand addr, OPT_RegisterOperand src) { + public void translateStore32(OPT_Operand addr, OPT_RegisterOperand src) { translateStore(store32, DBT_Trace.MEMORY_STORE32, addr, src); } @@ -388,7 +389,7 @@ * @param addr * the address of the value to store */ - public void translateCallBasedStore8(OPT_RegisterOperand addr, + public void translateCallBasedStore8(OPT_Operand addr, OPT_RegisterOperand src) { translateStore(store8, DBT_Trace.MEMORY_STORE8, addr, src); } @@ -401,7 +402,7 @@ * @param addr * the address of the value to store */ - public void translateCallBasedStore16(OPT_RegisterOperand addr, + public void translateCallBasedStore16(OPT_Operand addr, OPT_RegisterOperand src) { translateStore(store16, DBT_Trace.MEMORY_STORE16, addr, src); } @@ -414,7 +415,7 @@ * @param addr * the address of the value to store */ - public void translateCallBasedStore32(OPT_RegisterOperand addr, + public void translateCallBasedStore32(OPT_Operand addr, OPT_RegisterOperand src) { translateStore(store32, DBT_Trace.MEMORY_STORE32, addr, src); } Modified: src/org/binarytranslator/generic/memory/Memory.java =================================================================== --- src/org/binarytranslator/generic/memory/Memory.java 2007-03-31 22:03:22 UTC (rev 17) +++ src/org/binarytranslator/generic/memory/Memory.java 2007-04-01 12:27:50 UTC (rev 18) @@ -8,6 +8,7 @@ */ package org.binarytranslator.generic.memory; +import org.jikesrvm.opt.ir.OPT_Operand; import org.jikesrvm.opt.ir.OPT_RegisterOperand; import org.jikesrvm.classloader.VM_MethodReference; import org.binarytranslator.vmInterface.TranslationHelper; @@ -201,7 +202,7 @@ * @param addr * the address of the value to load */ - public abstract void translateLoadSigned8(OPT_RegisterOperand addr, + public abstract void translateLoadSigned8(OPT_Operand addr, OPT_RegisterOperand dest); /** @@ -213,7 +214,7 @@ * @param addr * the address of the value to load */ - public abstract void translateLoadUnsigned8(OPT_RegisterOperand addr, + public abstract void translateLoadUnsigned8(OPT_Operand addr, OPT_RegisterOperand dest); /** @@ -225,7 +226,7 @@ * @param addr * the address of the value to load */ - public abstract void translateLoadSigned16(OPT_RegisterOperand addr, + public abstract void translateLoadSigned16(OPT_Operand addr, OPT_RegisterOperand dest); /** @@ -237,7 +238,7 @@ * @param addr * the address of the value to load */ - public abstract void translateLoadUnsigned16(OPT_RegisterOperand addr, + public abstract void translateLoadUnsigned16(OPT_Operand addr, OPT_RegisterOperand dest); /** @@ -248,7 +249,7 @@ * @param addr * the address of the value to load */ - public abstract void translateLoad32(OPT_RegisterOperand addr, + public abstract void translateLoad32(OPT_Operand addr, OPT_RegisterOperand dest); /** @@ -259,7 +260,7 @@ * @param addr * the address of the value to store */ - public abstract void translateStore8(OPT_RegisterOperand addr, + public abstract void translateStore8(OPT_Operand addr, OPT_RegisterOperand src); /** @@ -270,7 +271,7 @@ * @param addr * the address of the value to store */ - public abstract void translateStore16(OPT_RegisterOperand addr, + public abstract void translateStore16(OPT_Operand addr, OPT_RegisterOperand src); /** @@ -281,7 +282,7 @@ * @param addr * the address of the value to store */ - public abstract void translateStore32(OPT_RegisterOperand addr, + public abstract void translateStore32(OPT_Operand addr, OPT_RegisterOperand src); /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |