Search in sources :

Example 1 with TableSwitchOp

use of org.graalvm.compiler.lir.sparc.SPARCControlFlow.TableSwitchOp in project graal by oracle.

the class SPARCLIRGenerator method emitTableSwitch.

@Override
protected void emitTableSwitch(int lowKey, LabelRef defaultTarget, LabelRef[] targets, Value key) {
    // Making a copy of the switch value is necessary because jump table destroys the input
    // value
    Variable tmp = newVariable(key.getValueKind());
    emitMove(tmp, key);
    append(new TableSwitchOp(lowKey, defaultTarget, targets, tmp, newVariable(LIRKind.value(target().arch.getWordKind()))));
}
Also used : Variable(org.graalvm.compiler.lir.Variable) TableSwitchOp(org.graalvm.compiler.lir.sparc.SPARCControlFlow.TableSwitchOp)

Aggregations

Variable (org.graalvm.compiler.lir.Variable)1 TableSwitchOp (org.graalvm.compiler.lir.sparc.SPARCControlFlow.TableSwitchOp)1