# HG changeset patch # User Josef Eisl # Date 1430125054 -7200 # Node ID d2bae7605fe4a07ffea83194dbaaf613ee99d9d7 # Parent 50a21b1fe8b7e6182f5f471c81b62aec4c0b7e33 Introduce StackMove LIR instruction. diff -r 50a21b1fe8b7 -r d2bae7605fe4 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java --- 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 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; + } + } + }