Mercurial > hg > truffle
diff graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java @ 21198:d2bae7605fe4
Introduce StackMove LIR instruction.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Mon, 27 Apr 2015 10:57:34 +0200 |
parents | aa8e0e2c5751 |
children | 04339fd2c863 |
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; + } + } + }