changeset 22482:aacbf2e9aa42

Remove dead code.
author Roland Schatz <roland.schatz@oracle.com>
date Wed, 19 Aug 2015 14:06:18 +0200
parents 5609b05ae0c6
children 4d973aaf97dc 77f91e4981dd
files graal/com.oracle.graal.asm.amd64/src/com/oracle/graal/asm/amd64/AMD64MacroAssembler.java graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64FrameMap.java graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCFrameMap.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMap.java mx.graal/suite.py
diffstat 7 files changed, 6 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.asm.amd64/src/com/oracle/graal/asm/amd64/AMD64MacroAssembler.java	Wed Aug 19 11:09:49 2015 +0200
+++ b/graal/com.oracle.graal.asm.amd64/src/com/oracle/graal/asm/amd64/AMD64MacroAssembler.java	Wed Aug 19 14:06:18 2015 +0200
@@ -318,25 +318,4 @@
         movdbl(dest, tmp);
         addq(AMD64.rsp, target.getSizeInBytes(Kind.Double));
     }
-
-    /**
-     * Emit code to save a given set of callee save registers in the {@linkplain CalleeSaveLayout
-     * CSA} within the frame.
-     *
-     * @param csl the description of the CSA
-     * @param frameToCSA offset from the frame pointer to the CSA
-     */
-    public final void save(CalleeSaveLayout csl, int frameToCSA) {
-        for (Register r : csl.registers) {
-            int offset = csl.offsetOf(r);
-            movq(new AMD64Address(frameRegister, frameToCSA + offset), r);
-        }
-    }
-
-    public final void restore(CalleeSaveLayout csl, int frameToCSA) {
-        for (Register r : csl.registers) {
-            int offset = csl.offsetOf(r);
-            movq(r, new AMD64Address(frameRegister, frameToCSA + offset));
-        }
-    }
 }
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java	Wed Aug 19 11:09:49 2015 +0200
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java	Wed Aug 19 14:06:18 2015 +0200
@@ -175,12 +175,7 @@
                         asm.movl(new AMD64Address(rsp, i * intSize), 0xC1C1C1C1);
                     }
                 }
-                CalleeSaveLayout csl = frameMap.getRegisterConfig().getCalleeSaveLayout();
-                if (csl != null && csl.size != 0) {
-                    int frameToCSA = frameMap.offsetToCalleeSaveArea();
-                    assert frameToCSA >= 0;
-                    asm.save(csl, frameToCSA);
-                }
+                assert frameMap.getRegisterConfig().getCalleeSaveRegisters() == null;
             }
         }
 
@@ -188,13 +183,7 @@
         public void leave(CompilationResultBuilder crb) {
             if (!omitFrame) {
                 AMD64MacroAssembler asm = (AMD64MacroAssembler) crb.asm;
-                CalleeSaveLayout csl = crb.frameMap.getRegisterConfig().getCalleeSaveLayout();
-
-                if (csl != null && csl.size != 0) {
-                    // saved all registers, restore all registers
-                    int frameToCSA = crb.frameMap.offsetToCalleeSaveArea();
-                    asm.restore(csl, frameToCSA);
-                }
+                assert crb.frameMap.getRegisterConfig().getCalleeSaveRegisters() == null;
 
                 int frameSize = crb.frameMap.frameSize();
                 asm.incrementq(rsp, frameSize);
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java	Wed Aug 19 11:09:49 2015 +0200
+++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java	Wed Aug 19 14:06:18 2015 +0200
@@ -104,7 +104,7 @@
     @SuppressWarnings("unused")
     private static Value[] createNativeABICallerSaveRegisters(HotSpotVMConfig config, RegisterConfig regConfig) {
         Set<Register> callerSavedRegisters = new HashSet<>();
-        Collections.addAll(callerSavedRegisters, regConfig.getCalleeSaveLayout().registers);
+        Collections.addAll(callerSavedRegisters, regConfig.getCalleeSaveRegisters());
         Collections.addAll(callerSavedRegisters, SPARC.fpuRegisters);
         callerSavedRegisters.add(SPARC.g1);
         callerSavedRegisters.add(SPARC.g4);
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64FrameMap.java	Wed Aug 19 11:09:49 2015 +0200
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64FrameMap.java	Wed Aug 19 14:06:18 2015 +0200
@@ -77,7 +77,7 @@
     public AMD64FrameMap(CodeCacheProvider codeCache, RegisterConfig registerConfig, ReferenceMapBuilderFactory referenceMapFactory) {
         super(codeCache, registerConfig, referenceMapFactory);
         // (negative) offset relative to sp + total frame size
-        initialSpillSize = returnAddressSize() + calleeSaveAreaSize();
+        initialSpillSize = returnAddressSize();
         spillSize = initialSpillSize;
     }
 
@@ -97,11 +97,6 @@
     }
 
     @Override
-    public int offsetToCalleeSaveArea() {
-        return frameSize() - calleeSaveAreaSize();
-    }
-
-    @Override
     protected StackSlot allocateNewSpillSlot(LIRKind kind, int additionalOffset) {
         return StackSlot.get(kind, -spillSize + additionalOffset, true);
     }
--- a/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCFrameMap.java	Wed Aug 19 11:09:49 2015 +0200
+++ b/graal/com.oracle.graal.lir.sparc/src/com/oracle/graal/lir/sparc/SPARCFrameMap.java	Wed Aug 19 14:06:18 2015 +0200
@@ -89,12 +89,7 @@
 
     @Override
     public int currentFrameSize() {
-        return alignFrameSize(calleeSaveAreaSize() + outgoingSize + spillSize);
-    }
-
-    @Override
-    protected int calleeSaveAreaSize() {
-        return SPARC.REGISTER_SAFE_AREA_SIZE;
+        return alignFrameSize(SPARC.REGISTER_SAFE_AREA_SIZE + outgoingSize + spillSize);
     }
 
     @Override
@@ -103,11 +98,6 @@
     }
 
     @Override
-    public int offsetToCalleeSaveArea() {
-        return 0;
-    }
-
-    @Override
     protected StackSlot allocateNewSpillSlot(LIRKind kind, int additionalOffset) {
         return StackSlot.get(kind, -spillSize + additionalOffset, true);
     }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMap.java	Wed Aug 19 11:09:49 2015 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/framemap/FrameMap.java	Wed Aug 19 14:06:18 2015 +0200
@@ -120,11 +120,6 @@
         return getTarget().arch.getReturnAddressSize();
     }
 
-    protected int calleeSaveAreaSize() {
-        CalleeSaveLayout csl = getRegisterConfig().getCalleeSaveLayout();
-        return csl != null ? csl.size : 0;
-    }
-
     /**
      * Determines if an offset to an incoming stack argument was ever returned by
      * {@link #offsetForStackSlot(StackSlot)}.
@@ -205,14 +200,6 @@
     }
 
     /**
-     * Gets the offset from the stack pointer to the stack area where callee-saved registers are
-     * stored.
-     *
-     * @return The offset to the callee save area (in bytes).
-     */
-    public abstract int offsetToCalleeSaveArea();
-
-    /**
      * Informs the frame map that the compiled code calls a particular method, which may need stack
      * space for outgoing arguments.
      *
--- a/mx.graal/suite.py	Wed Aug 19 11:09:49 2015 +0200
+++ b/mx.graal/suite.py	Wed Aug 19 14:06:18 2015 +0200
@@ -6,7 +6,7 @@
     "suites": [
             {
                "name" : "jvmci",
-               "version" : "0666b6a8f33b0586af7fd3c517ca9c100ee7df44",
+               "version" : "0a0c0111ecda34c4d8ac6b74745c201613ae6519",
                "urls" : [
                     {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/graal-jvmci-8", "kind" : "hg"},
                     {"url" : "http://lafo.ssw.uni-linz.ac.at/nexus/content/repositories/snapshots", "kind" : "binary"},