Search in sources :

Example 6 with HotSpotLIRGenerator

use of org.graalvm.compiler.hotspot.HotSpotLIRGenerator in project graal by oracle.

the class LoadConstantIndirectlyNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    assert constant != null : "Expected the value to fold: " + value;
    Value result;
    if (constant instanceof HotSpotObjectConstant) {
        result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitLoadObjectAddress(constant);
    } else if (constant instanceof HotSpotMetaspaceConstant) {
        result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitLoadMetaspaceAddress(constant, action);
    } else {
        throw new PermanentBailoutException("Unsupported constant type: " + constant);
    }
    gen.setResult(this, result);
}
Also used : HotSpotLIRGenerator(org.graalvm.compiler.hotspot.HotSpotLIRGenerator) Value(jdk.vm.ci.meta.Value) HotSpotObjectConstant(jdk.vm.ci.hotspot.HotSpotObjectConstant) HotSpotMetaspaceConstant(jdk.vm.ci.hotspot.HotSpotMetaspaceConstant) PermanentBailoutException(org.graalvm.compiler.core.common.PermanentBailoutException)

Example 7 with HotSpotLIRGenerator

use of org.graalvm.compiler.hotspot.HotSpotLIRGenerator in project graal by oracle.

the class ResolveMethodAndLoadCountersStubCall method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    assert methodConstant != null : "Expected method to fold: " + method;
    Value methodDescriptionValue = gen.operand(methodDescription);
    Value klassHintValue = gen.operand(klassHint);
    LIRFrameState fs = gen.state(this);
    assert fs != null : "The stateAfter is null";
    Value result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitResolveMethodAndLoadCounters(methodConstant, klassHintValue, methodDescriptionValue, fs);
    gen.setResult(this, result);
}
Also used : LIRFrameState(org.graalvm.compiler.lir.LIRFrameState) HotSpotLIRGenerator(org.graalvm.compiler.hotspot.HotSpotLIRGenerator) Value(jdk.vm.ci.meta.Value)

Example 8 with HotSpotLIRGenerator

use of org.graalvm.compiler.hotspot.HotSpotLIRGenerator in project graal by oracle.

the class RandomSeedNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    Value result = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).emitRandomSeed();
    gen.setResult(this, result);
}
Also used : HotSpotLIRGenerator(org.graalvm.compiler.hotspot.HotSpotLIRGenerator) Value(jdk.vm.ci.meta.Value)

Example 9 with HotSpotLIRGenerator

use of org.graalvm.compiler.hotspot.HotSpotLIRGenerator in project graal by oracle.

the class GraalHotSpotVMConfigNode method generate.

@Override
public void generate(NodeLIRBuilderTool generator) {
    Value res = ((HotSpotLIRGenerator) generator.getLIRGeneratorTool()).emitLoadConfigValue(markId, generator.getLIRGeneratorTool().getLIRKind(stamp));
    generator.setResult(this, res);
}
Also used : HotSpotLIRGenerator(org.graalvm.compiler.hotspot.HotSpotLIRGenerator) Value(jdk.vm.ci.meta.Value)

Example 10 with HotSpotLIRGenerator

use of org.graalvm.compiler.hotspot.HotSpotLIRGenerator in project graal by oracle.

the class CurrentLockNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    assert lockDepth != -1;
    HotSpotLIRGenerator hsGen = (HotSpotLIRGenerator) gen.getLIRGeneratorTool();
    VirtualStackSlot slot = hsGen.getLockSlot(lockDepth);
    // The register allocator cannot handle stack -> register moves so we use an LEA here
    Value result = gen.getLIRGeneratorTool().emitAddress(slot);
    gen.setResult(this, result);
}
Also used : HotSpotLIRGenerator(org.graalvm.compiler.hotspot.HotSpotLIRGenerator) Value(jdk.vm.ci.meta.Value) VirtualStackSlot(org.graalvm.compiler.lir.VirtualStackSlot)

Aggregations

HotSpotLIRGenerator (org.graalvm.compiler.hotspot.HotSpotLIRGenerator)10 Value (jdk.vm.ci.meta.Value)9 HotSpotMetaspaceConstant (jdk.vm.ci.hotspot.HotSpotMetaspaceConstant)4 HotSpotObjectConstant (jdk.vm.ci.hotspot.HotSpotObjectConstant)3 PermanentBailoutException (org.graalvm.compiler.core.common.PermanentBailoutException)3 LIRFrameState (org.graalvm.compiler.lir.LIRFrameState)3 VirtualStackSlot (org.graalvm.compiler.lir.VirtualStackSlot)2 Register (jdk.vm.ci.code.Register)1 PlatformKind (jdk.vm.ci.meta.PlatformKind)1