Search in sources :

Example 6 with LIRKind

use of org.graalvm.compiler.core.common.LIRKind in project graal by oracle.

the class ReadNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    LIRKind readKind = gen.getLIRGeneratorTool().getLIRKind(getAccessStamp());
    gen.setResult(this, gen.getLIRGeneratorTool().getArithmetic().emitLoad(readKind, gen.operand(address), gen.state(this)));
}
Also used : LIRKind(org.graalvm.compiler.core.common.LIRKind)

Example 7 with LIRKind

use of org.graalvm.compiler.core.common.LIRKind in project graal by oracle.

the class WriteNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    LIRKind writeKind = gen.getLIRGeneratorTool().getLIRKind(value().stamp(NodeView.DEFAULT));
    gen.getLIRGeneratorTool().getArithmetic().emitStore(writeKind, gen.operand(address), gen.operand(value()), gen.state(this));
}
Also used : LIRKind(org.graalvm.compiler.core.common.LIRKind)

Example 8 with LIRKind

use of org.graalvm.compiler.core.common.LIRKind in project graal by oracle.

the class VMThreadLocalSTHolderNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    Object holder;
    if (threadLocalInfo.isObject) {
        holder = ImageSingletons.lookup(VMThreadLocalSTSupport.class).objectThreadLocals;
    } else {
        holder = ImageSingletons.lookup(VMThreadLocalSTSupport.class).primitiveThreadLocals;
    }
    LIRKind kind = gen.getLIRGeneratorTool().getLIRKind(stamp(NodeView.DEFAULT));
    gen.setResult(this, gen.getLIRGeneratorTool().emitLoadConstant(kind, SubstrateObjectConstant.forObject(holder)));
}
Also used : LIRKind(org.graalvm.compiler.core.common.LIRKind)

Example 9 with LIRKind

use of org.graalvm.compiler.core.common.LIRKind in project graal by oracle.

the class ReadRegisterFloatingNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    VMError.guarantee(usages().filter(FrameState.class).isEmpty(), "When used in a FrameState, need a ReadRegisterFixedNode and not a ReadRegisterFloatingNode");
    LIRGeneratorTool tool = gen.getLIRGeneratorTool();
    SubstrateRegisterConfig registerConfig = (SubstrateRegisterConfig) tool.getRegisterConfig();
    LIRKind lirKind = tool.getLIRKind(FrameAccess.getWordStamp());
    RegisterValue value = registerSupplier.apply(registerConfig).asValue(lirKind);
    gen.setResult(this, value);
}
Also used : RegisterValue(jdk.vm.ci.code.RegisterValue) LIRKind(org.graalvm.compiler.core.common.LIRKind) SubstrateRegisterConfig(com.oracle.svm.core.graal.meta.SubstrateRegisterConfig) LIRGeneratorTool(org.graalvm.compiler.lir.gen.LIRGeneratorTool)

Example 10 with LIRKind

use of org.graalvm.compiler.core.common.LIRKind in project graal by oracle.

the class DirectStoreNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    Value v = gen.operand(value);
    LIRKind lirKind = LIRKind.fromJavaKind(gen.getLIRGeneratorTool().target().arch, kind);
    gen.getLIRGeneratorTool().getArithmetic().emitStore(lirKind, gen.operand(address), v, null);
}
Also used : Value(jdk.vm.ci.meta.Value) LIRKind(org.graalvm.compiler.core.common.LIRKind)

Aggregations

LIRKind (org.graalvm.compiler.core.common.LIRKind)60 AllocatableValue (jdk.vm.ci.meta.AllocatableValue)20 Variable (org.graalvm.compiler.lir.Variable)19 Value (jdk.vm.ci.meta.Value)15 RegisterValue (jdk.vm.ci.code.RegisterValue)11 TargetDescription (jdk.vm.ci.code.TargetDescription)7 PlatformKind (jdk.vm.ci.meta.PlatformKind)7 LIRGeneratorTool (org.graalvm.compiler.lir.gen.LIRGeneratorTool)7 AMD64Kind (jdk.vm.ci.amd64.AMD64Kind)6 JavaConstant (jdk.vm.ci.meta.JavaConstant)4 SPARCKind (jdk.vm.ci.sparc.SPARCKind)4 ComplexMatchValue (org.graalvm.compiler.core.match.ComplexMatchValue)4 AArch64AddressValue (org.graalvm.compiler.lir.aarch64.AArch64AddressValue)4 AMD64AddressValue (org.graalvm.compiler.lir.amd64.AMD64AddressValue)4 ComplexMatchResult (org.graalvm.compiler.core.match.ComplexMatchResult)3 MatchRule (org.graalvm.compiler.core.match.MatchRule)3 ConstantValue (org.graalvm.compiler.lir.ConstantValue)3 AMD64MulDivOp (org.graalvm.compiler.lir.amd64.AMD64MulDivOp)3 SubstrateRegisterConfig (com.oracle.svm.core.graal.meta.SubstrateRegisterConfig)2 Op3s (org.graalvm.compiler.asm.sparc.SPARCAssembler.Op3s)2