changeset 1933:2a6ce81e3101

Merge.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Tue, 21 Dec 2010 17:09:45 +0100
parents e6500c6c5e24 (current diff) ace6e55373eb (diff)
children b1f2e875300a
files c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java
diffstat 6 files changed, 21 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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));
--- 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;
--- 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;
--- 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;
     }
 
--- 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
--- 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