# HG changeset patch # User Thomas Wuerthinger # Date 1292947785 -3600 # Node ID 2a6ce81e3101c480cbd0eb1df7174b5a87e40937 # Parent e6500c6c5e2444bba83777e3f2f15026788ba94e# Parent ace6e55373eb2ea735b905c91329e44df1882a08 Merge. diff -r e6500c6c5e24 -r 2a6ce81e3101 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java Tue Dec 21 17:09:37 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java Tue Dec 21 17:09:45 2010 +0100 @@ -148,7 +148,7 @@ final int wordSize = 8; final int stackFrameAlignment = 16; registerConfig = runtime.globalStubRegConfig; - target = new HotSpotTarget(new AMD64(), true, wordSize, wordSize, wordSize, stackFrameAlignment, config.vmPageSize, wordSize, wordSize, config.codeEntryAlignment, true); + target = new HotSpotTarget(new AMD64(), true, wordSize, stackFrameAlignment, config.vmPageSize, wordSize, true); if (Logger.ENABLED) { generator = LoggingProxy.getProxy(RiXirGenerator.class, new HotSpotXirGenerator(config, target, registerConfig)); diff -r e6500c6c5e24 -r 2a6ce81e3101 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java Tue Dec 21 17:09:37 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java Tue Dec 21 17:09:45 2010 +0100 @@ -173,6 +173,12 @@ return "HotSpotMethod<" + holder().name() + ". " + name + ">"; } + public boolean hasCompiledCode() { + // TODO: needs a VMEntries to go cache the result of that method. + // This isn't used by GRAAL for now, so this is enough. + return false; + } + @Override public Class accessor() { return null; diff -r e6500c6c5e24 -r 2a6ce81e3101 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodUnresolved.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodUnresolved.java Tue Dec 21 17:09:37 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodUnresolved.java Tue Dec 21 17:09:45 2010 +0100 @@ -143,6 +143,10 @@ return "HotSpotMethod<" + holder.name() + ". " + name + ", unresolved>"; } + public boolean hasCompiledCode() { + return false; + } + @Override public Class accessor() { return null; diff -r e6500c6c5e24 -r 2a6ce81e3101 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java Tue Dec 21 17:09:37 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java Tue Dec 21 17:09:45 2010 +0100 @@ -85,7 +85,7 @@ } if (globalStubConfig) { - registerSaveArea = new CiCalleeSaveArea(-1, rsaRegs, 8); + registerSaveArea = new CiCalleeSaveArea(-1, 8, rsaRegs); } else { registerSaveArea = CiCalleeSaveArea.EMPTY; } @@ -101,7 +101,7 @@ } @Override - public CiRegister getRegister(int index) { + public CiRegister getRegisterForRole(int index) { throw new UnsupportedOperationException(); } @@ -113,7 +113,7 @@ return callingConvention(parameters, type, target); } - public CiRegister[] getCallingConventionRegisters(Type type) { + public CiRegister[] getCallingConventionRegisters(Type type, RegisterFlag flag) { return allParameterRegisters; } diff -r e6500c6c5e24 -r 2a6ce81e3101 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java Tue Dec 21 17:09:37 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java Tue Dec 21 17:09:45 2010 +0100 @@ -29,7 +29,6 @@ import com.sun.cri.ci.CiTargetMethod.DataPatch; import com.sun.cri.ci.CiTargetMethod.Safepoint; import com.sun.cri.ri.*; -import com.sun.max.asm.*; import com.sun.max.asm.dis.*; import com.sun.max.lang.*; @@ -57,14 +56,14 @@ } @Override - public String disassemble(byte[] code) { - return disassemble(code, new DisassemblyPrinter(false)); + public String disassemble(byte[] code, long address) { + return disassemble(code, new DisassemblyPrinter(false), address); } - private String disassemble(byte[] code, DisassemblyPrinter disassemblyPrinter) { + private String disassemble(byte[] code, DisassemblyPrinter disassemblyPrinter, long address) { final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); final ISA instructionSet = ISA.AMD64; - Disassembler.disassemble(byteArrayOutputStream, code, instructionSet, WordWidth.BITS_64, 0, null, disassemblyPrinter); + Disassembler.disassemble(byteArrayOutputStream, code, instructionSet, WordWidth.BITS_64, address, null, disassemblyPrinter); return byteArrayOutputStream.toString(); } @@ -121,7 +120,7 @@ } }; final byte[] code = Arrays.copyOf(targetMethod.targetCode(), targetMethod.targetCodeSize()); - return disassemble(code, disassemblyPrinter); + return disassemble(code, disassemblyPrinter, 0L); } @Override diff -r e6500c6c5e24 -r 2a6ce81e3101 c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTarget.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTarget.java Tue Dec 21 17:09:37 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTarget.java Tue Dec 21 17:09:45 2010 +0100 @@ -29,9 +29,8 @@ */ public class HotSpotTarget extends CiTarget { - public HotSpotTarget(CiArchitecture arch, boolean isMP, int spillSlotSize, int wordSize, int referenceSize, int stackAlignment, int pageSize, int cacheAlignment, - int heapAlignment, int codeAlignment, boolean inlineObjects) { - super(arch, isMP, spillSlotSize, wordSize, referenceSize, stackAlignment, pageSize, cacheAlignment, heapAlignment, codeAlignment, inlineObjects, true); + public HotSpotTarget(CiArchitecture arch, boolean isMP, int spillSlotSize, int stackAlignment, int pageSize, int cacheAlignment, boolean inlineObjects) { + super(arch, isMP, spillSlotSize, stackAlignment, pageSize, cacheAlignment, inlineObjects, true); } @Override