diff graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64SaveRegistersOp.java @ 9491:789cfd153265

a compiled stub can now specify whether it needs to preserve registers. If a stub does not preserve registers and assertions are enabled, then all non-temporary registers are zapped after a C runtime call from the stub. the ExceptionHandler stub no longer preserves registers
author Doug Simon <doug.simon@oracle.com>
date Thu, 02 May 2013 06:08:02 +0200
parents 45a73cd19baa
children d48b7a4b93e9
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64SaveRegistersOp.java	Wed May 01 18:08:07 2013 -0700
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64SaveRegistersOp.java	Thu May 02 06:08:02 2013 +0200
@@ -37,7 +37,7 @@
  * Saves registers to stack slots.
  */
 @Opcode("SAVE_REGISTER")
-public final class AMD64SaveRegistersOp extends AMD64LIRInstruction {
+public final class AMD64SaveRegistersOp extends AMD64RegistersPreservationOp {
 
     /**
      * The move instructions for saving the registers.
@@ -70,16 +70,17 @@
     }
 
     /**
-     * Prunes the set of registers saved by this operation to exclude those in {@code notSaved} and
+     * Prunes the set of registers saved by this operation to exclude those in {@code ignored} and
      * updates {@code debugInfo} with a {@linkplain DebugInfo#getCalleeSaveInfo() description} of
      * where each preserved register is saved.
      */
-    public void updateAndDescribePreservation(Set<Register> notSaved, DebugInfo debugInfo, FrameMap frameMap) {
+    @Override
+    public void update(Set<Register> ignored, DebugInfo debugInfo, FrameMap frameMap) {
         int preserved = 0;
         for (int i = 0; i < savingMoves.length; i++) {
             if (savingMoves[i] != null) {
                 Register register = ValueUtil.asRegister(((MoveOp) savingMoves[i]).getInput());
-                if (notSaved.contains(register)) {
+                if (ignored.contains(register)) {
                     savingMoves[i] = null;
                     restoringMoves[i] = null;
                 } else {