Mercurial > hg > truffle
changeset 1417:2c41834aa270
Small adaptations
author | Thomas Wuerthinger <thomas.wuerthinger@gmail.com> |
---|---|
date | Wed, 23 Jun 2010 17:20:40 +0200 |
parents | 1b41af477605 |
children | 55ac38887415 |
files | c1x4hotspotsrc/HotSpotVM/.classpath c1x4hotspotsrc/HotSpotVM/README.txt c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotConstantPool.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java |
diffstat | 5 files changed, 32 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/.classpath Wed Jun 23 16:36:58 2010 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/.classpath Wed Jun 23 17:20:40 2010 +0200 @@ -2,8 +2,9 @@ <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> - <classpathentry kind="lib" path="C:/Projects/Maxine/maxine/Assembler/bin"/> - <classpathentry kind="lib" path="C:/Projects/Maxine/maxine/C1X/bin"/> - <classpathentry kind="lib" path="C:/Projects/Maxine/maxine/CRI/bin"/> + <classpathentry combineaccessrules="false" kind="src" path="/Assembler"/> + <classpathentry combineaccessrules="false" kind="src" path="/Base"/> + <classpathentry combineaccessrules="false" kind="src" path="/C1X"/> + <classpathentry combineaccessrules="false" kind="src" path="/CRI"/> <classpathentry kind="output" path="bin"/> </classpath>
--- a/c1x4hotspotsrc/HotSpotVM/README.txt Wed Jun 23 16:36:58 2010 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/README.txt Wed Jun 23 17:20:40 2010 +0200 @@ -1,3 +1,4 @@ The classes from the projects C1X, CRI, and HotSpotVM have to be on the classpath. The classes of the HotSpotVM project have to be on the bootclasspath Example command line arguments for HotSpot: --XX:+UseC1X -XX:TraceC1X=5 -Xbootclasspath/a:THIS_DIRECTORY/bin SomeClass \ No newline at end of file +-XX:+UseC1X -XX:TraceC1X=5 -Xbootclasspath/a:THIS_DIRECTORY/bin;MAXINE_DIR/C1X/bin;MAXINE_DIR/CRI/bin SomeClass +
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotConstantPool.java Wed Jun 23 16:36:58 2010 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotConstantPool.java Wed Jun 23 17:20:40 2010 +0200 @@ -27,8 +27,8 @@ } @Override - public RiMethod lookupMethod(int cpi, byte byteCode) { - return VMEntries.RiConstantPool_lookupMethod(constantPoolOop, cpi, byteCode); + public RiMethod lookupMethod(int cpi, int byteCode) { + return VMEntries.RiConstantPool_lookupMethod(constantPoolOop, cpi, (byte)byteCode); } @Override @@ -37,12 +37,12 @@ } @Override - public RiType lookupType(int cpi) { + public RiType lookupType(int cpi, int opcode) { return VMEntries.RiConstantPool_lookupType(constantPoolOop, cpi); } @Override - public RiField lookupField(int cpi) { + public RiField lookupField(int cpi, int opcode) { return VMEntries.RiConstantPool_lookupField(constantPoolOop, cpi); }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java Wed Jun 23 16:36:58 2010 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java Wed Jun 23 17:20:40 2010 +0200 @@ -79,7 +79,7 @@ private String disassemble(byte[] code, DisassemblyPrinter disassemblyPrinter) { final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); final InstructionSet instructionSet = InstructionSet.AMD64; - //Disassembler.disassemble(byteArrayOutputStream, code, instructionSet, null, 0, null, disassemblyPrinter); + Disassembler.disassemble(byteArrayOutputStream, code, instructionSet, null, 0, null, disassemblyPrinter); return byteArrayOutputStream.toString(); } @@ -226,4 +226,10 @@ return null; } + @Override + public CiConstant foldWordOperation(int opcode, CiMethodInvokeArguments args) { + // TODO Auto-generated method stub + return null; + } + }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Wed Jun 23 16:36:58 2010 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Wed Jun 23 17:20:40 2010 +0200 @@ -39,37 +39,40 @@ /** * * @author Thomas Wuerthinger - * + * */ public class HotSpotXirGenerator extends RiXirGenerator { private XirTemplate[] emptyTemplates = new XirTemplate[CiKind.values().length]; - + @Override public List<XirTemplate> buildTemplates(CiXirAssembler asm) { List<XirTemplate> templates = new ArrayList<XirTemplate>(); - for (int i=0; i<CiKind.values().length; i++) { - + for (int i = 0; i < CiKind.values().length; i++) { + CiKind curKind = CiKind.values()[i]; - if (curKind == CiKind.Float || curKind == CiKind.Double) continue; - + if (curKind == CiKind.Float || curKind == CiKind.Double) + continue; + if (CiKind.values()[i] == CiKind.Void) { asm.restart(CiKind.values()[i]); - emptyTemplates[i] = asm.finishTemplate("empty-" + CiKind.values()[i]); + emptyTemplates[i] = asm.finishTemplate("empty-" + + CiKind.values()[i]); } else { asm.restart(); - XirOperand result = asm.createTemp("result", CiKind.values()[i]); - emptyTemplates[i] = asm.finishTemplate(result, "empty-" + CiKind.values()[i]); + XirOperand result = asm + .createTemp("result", CiKind.values()[i]); + emptyTemplates[i] = asm.finishTemplate(result, "empty-" + + CiKind.values()[i]); } templates.add(emptyTemplates[i]); } - - + return templates; } - + @Override public XirSnippet genArrayLength(XirSite site, XirArgument array) { return new XirSnippet(emptyTemplates[CiKind.Int.ordinal()]);