changeset 1455:43a93774d24f

Syncing changes with C1X.
author Doug Simon <doug.simon@oracle.com>
date Fri, 12 Nov 2010 16:11:41 +0100
parents 9196a2b32950
children cb03c46412a4
files c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTarget.java src/share/vm/c1x/c1x_TargetMethod.hpp
diffstat 5 files changed, 30 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java	Tue Nov 09 17:40:15 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java	Fri Nov 12 16:11:41 2010 +0100
@@ -20,11 +20,8 @@
  */
 package com.sun.hotspot.c1x;
 
-import static com.sun.c1x.target.amd64.AMD64.*;
-
 import java.lang.reflect.Proxy;
 import java.net.*;
-import java.util.*;
 
 import com.sun.c1x.*;
 import com.sun.c1x.target.amd64.*;
@@ -136,27 +133,10 @@
     private final CiCompiler compiler;
     private final HotSpotVMConfig config;
     private final HotSpotRuntime runtime;
-    private final RiRegisterConfig registerConfig;
+    private final HotSpotRegisterConfig registerConfig;
     private final CiTarget target;
     private final RiXirGenerator generator;
 
-    public static final CiRegisterSaveArea RSA;
-    static {
-        int offset = 0;
-        CiRegister[] rsaRegs = {
-            rax,  rcx,  rdx,   rbx,   rsp,   rbp,   rsi,   rdi,
-            r8,   r9,   r10,   r11,   r12,   r13,   r14,   r15,
-            xmm0, xmm1, xmm2,  xmm3,  xmm4,  xmm5,  xmm6,  xmm7,
-            xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15
-        };
-        Map<CiRegister, Integer> registerOffsets = new HashMap<CiRegister, Integer>(rsaRegs.length);
-        for (CiRegister reg : rsaRegs) {
-            registerOffsets.put(reg, offset);
-            offset += reg.isFpu() ? 16 : 8;
-        }
-        RSA = new CiRegisterSaveArea(offset, registerOffsets, 8, rax, r15);
-    }
-
     private Compiler() {
         config = getVMEntries().getConfiguration();
         config.check();
@@ -165,7 +145,7 @@
         final int wordSize = 8;
         final int stackFrameAlignment = 16;
         registerConfig = runtime.regConfig;
-        target = new HotSpotTarget(new AMD64(), RSA, true, wordSize, wordSize, wordSize, stackFrameAlignment, config.vmPageSize, wordSize, wordSize, config.codeEntryAlignment, true);
+        target = new HotSpotTarget(new AMD64(), true, wordSize, wordSize, wordSize, stackFrameAlignment, config.vmPageSize, wordSize, wordSize, config.codeEntryAlignment, true);
 
         if (Logger.ENABLED) {
             generator = LoggingProxy.getProxy(RiXirGenerator.class, new HotSpotXirGenerator(config, target, registerConfig));
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java	Tue Nov 09 17:40:15 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java	Fri Nov 12 16:11:41 2010 +0100
@@ -67,6 +67,23 @@
     private final CiRegister[] xmmParameterRegisters = {xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7};
     private final CiRegister[] allParameterRegisters;
 
+    public static final CiRegisterSaveArea RSA;
+    static {
+        int offset = 0;
+        CiRegister[] rsaRegs = {
+            rax,  rcx,  rdx,   rbx,   rsp,   rbp,   rsi,   rdi,
+            r8,   r9,   r10,   r11,   r12,   r13,   r14,   r15,
+            xmm0, xmm1, xmm2,  xmm3,  xmm4,  xmm5,  xmm6,  xmm7,
+            xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15
+        };
+        Map<CiRegister, Integer> registerOffsets = new HashMap<CiRegister, Integer>(rsaRegs.length);
+        for (CiRegister reg : rsaRegs) {
+            registerOffsets.put(reg, offset);
+            offset += reg.isFpu() ? 16 : 8;
+        }
+        RSA = new CiRegisterSaveArea(offset, registerOffsets, 8);
+    }
+
     public HotSpotRegisterConfig(HotSpotVMConfig config) {
         if (config.windowsOs) {
             generalParameterRegisters = new CiRegister[] {rdx, r8, r9, rdi, rsi, rcx};
@@ -185,6 +202,10 @@
         return rsp;
     }
 
+    public CiRegisterSaveArea getRSA() {
+        return RSA;
+    }
+
     @Override
     public String toString() {
         String res = String.format(
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java	Tue Nov 09 17:40:15 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java	Fri Nov 12 16:11:41 2010 +0100
@@ -225,4 +225,9 @@
     public RiRegisterConfig getRegisterConfig(RiMethod method) {
         return regConfig;
     }
+
+    public boolean needsDebugInfo() {
+        return false;
+    }
+
 }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTarget.java	Tue Nov 09 17:40:15 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTarget.java	Fri Nov 12 16:11:41 2010 +0100
@@ -29,9 +29,9 @@
  */
 public class HotSpotTarget extends CiTarget {
 
-    public HotSpotTarget(CiArchitecture arch, CiRegisterSaveArea rsa, boolean isMP, int spillSlotSize, int wordSize, int referenceSize, int stackAlignment, int pageSize, int cacheAlignment,
+    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, rsa, isMP, spillSlotSize, wordSize, referenceSize, stackAlignment, pageSize, cacheAlignment, heapAlignment, codeAlignment, inlineObjects);
+        super(arch, isMP, spillSlotSize, wordSize, referenceSize, stackAlignment, pageSize, cacheAlignment, heapAlignment, codeAlignment, inlineObjects, true);
     }
 
     @Override
--- a/src/share/vm/c1x/c1x_TargetMethod.hpp	Tue Nov 09 17:40:15 2010 +0100
+++ b/src/share/vm/c1x/c1x_TargetMethod.hpp	Fri Nov 12 16:11:41 2010 +0100
@@ -79,7 +79,6 @@
     int_field(CiTargetMethod, frameSize)                                                \
     oop_field(CiTargetMethod, targetCode, "[B")                                         \
     int_field(CiTargetMethod, targetCodeSize)                                           \
-    int_field(CiTargetMethod, referenceRegisterCount)                                   \
   end_class                                                                             \
   start_class(CiTargetMethod_Site)                                                      \
     int_field(CiTargetMethod_Site, pcOffset)                                            \