changeset 21198:d2bae7605fe4

Introduce StackMove LIR instruction.
author Josef Eisl <josef.eisl@jku.at>
date Mon, 27 Apr 2015 10:57:34 +0200
parents 50a21b1fe8b7
children a5ea5041155d
files graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/PhiResolver.java
diffstat 1 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java	Mon Apr 27 11:21:09 2015 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java	Mon Apr 27 10:57:34 2015 +0200
@@ -235,4 +235,33 @@
             // do nothing, just keep value alive until at least here
         }
     }
+
+    public static final class StackMove extends LIRInstruction implements MoveOp {
+        public static final LIRInstructionClass<StackMove> TYPE = LIRInstructionClass.create(StackMove.class);
+
+        @Def({STACK, HINT}) protected AllocatableValue result;
+        @Use({STACK}) protected Value input;
+
+        public StackMove(AllocatableValue result, Value input) {
+            super(TYPE);
+            this.result = result;
+            this.input = input;
+        }
+
+        @Override
+        public void emitCode(CompilationResultBuilder crb) {
+            throw new GraalInternalError(this + " should have been removed");
+        }
+
+        @Override
+        public Value getInput() {
+            return input;
+        }
+
+        @Override
+        public AllocatableValue getResult() {
+            return result;
+        }
+    }
+
 }