Search in sources :

Example 1 with ArithmeticLIRGeneratorTool

use of org.graalvm.compiler.lir.gen.ArithmeticLIRGeneratorTool in project graal by oracle.

the class AArch64PointerAddNode method generate.

@Override
public void generate(NodeLIRBuilderTool builder, ArithmeticLIRGeneratorTool gen) {
    LIRGeneratorTool tool = builder.getLIRGeneratorTool();
    Value x = builder.operand(base);
    Value y = builder.operand(offset);
    AllocatableValue baseValue = tool.asAllocatable(x);
    AllocatableValue baseReference = LIRKind.derivedBaseFromValue(baseValue);
    LIRKind kind = LIRKind.combineDerived(tool.getLIRKind(stamp(NodeView.DEFAULT)), baseReference, null);
    builder.setResult(this, ((AArch64ArithmeticLIRGenerator) gen).emitBinary(kind, AArch64ArithmeticOp.ADD, true, x, y));
}
Also used : Value(jdk.vm.ci.meta.Value) AllocatableValue(jdk.vm.ci.meta.AllocatableValue) LIRKind(org.graalvm.compiler.core.common.LIRKind) LIRGeneratorTool(org.graalvm.compiler.lir.gen.LIRGeneratorTool) ArithmeticLIRGeneratorTool(org.graalvm.compiler.lir.gen.ArithmeticLIRGeneratorTool) AllocatableValue(jdk.vm.ci.meta.AllocatableValue)

Aggregations

AllocatableValue (jdk.vm.ci.meta.AllocatableValue)1 Value (jdk.vm.ci.meta.Value)1 LIRKind (org.graalvm.compiler.core.common.LIRKind)1 ArithmeticLIRGeneratorTool (org.graalvm.compiler.lir.gen.ArithmeticLIRGeneratorTool)1 LIRGeneratorTool (org.graalvm.compiler.lir.gen.LIRGeneratorTool)1