Search in sources :

Example 1 with SubstrateRegisterConfig

use of com.oracle.svm.core.graal.meta.SubstrateRegisterConfig 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 2 with SubstrateRegisterConfig

use of com.oracle.svm.core.graal.meta.SubstrateRegisterConfig in project graal by oracle.

the class AMD64DecrementingSafepointCheckOp method emitCode.

@Override
public void emitCode(CompilationResultBuilder crb, AMD64MacroAssembler masm) {
    assert SubstrateOptions.MultiThreaded.getValue();
    SubstrateRegisterConfig threadRegister = (SubstrateRegisterConfig) crb.codeCache.getRegisterConfig();
    masm.decrementl(new AMD64Address(threadRegister.getThreadRegister(), Math.toIntExact(Safepoint.getThreadLocalSafepointRequestedOffset())), 1);
}
Also used : SubstrateRegisterConfig(com.oracle.svm.core.graal.meta.SubstrateRegisterConfig) AMD64Address(org.graalvm.compiler.asm.amd64.AMD64Address)

Example 3 with SubstrateRegisterConfig

use of com.oracle.svm.core.graal.meta.SubstrateRegisterConfig in project graal by oracle.

the class WriteCurrentVMThreadNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    LIRGeneratorTool tool = gen.getLIRGeneratorTool();
    SubstrateRegisterConfig registerConfig = (SubstrateRegisterConfig) tool.getRegisterConfig();
    gen.getLIRGeneratorTool().emitMove(registerConfig.getThreadRegister().asValue(tool.getLIRKind(FrameAccess.getWordStamp())), gen.operand(value));
}
Also used : SubstrateRegisterConfig(com.oracle.svm.core.graal.meta.SubstrateRegisterConfig) LIRGeneratorTool(org.graalvm.compiler.lir.gen.LIRGeneratorTool)

Example 4 with SubstrateRegisterConfig

use of com.oracle.svm.core.graal.meta.SubstrateRegisterConfig in project graal by oracle.

the class WriteHeapBaseNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    LIRGeneratorTool tool = gen.getLIRGeneratorTool();
    tool.emitMove(((SubstrateRegisterConfig) tool.getResult().getRegisterConfig()).getHeapBaseRegister().asValue(tool.getLIRKind(FrameAccess.getWordStamp())), gen.operand(value));
}
Also used : SubstrateRegisterConfig(com.oracle.svm.core.graal.meta.SubstrateRegisterConfig) LIRGeneratorTool(org.graalvm.compiler.lir.gen.LIRGeneratorTool)

Example 5 with SubstrateRegisterConfig

use of com.oracle.svm.core.graal.meta.SubstrateRegisterConfig in project graal by oracle.

the class ReadRegisterFixedNode method generate.

@Override
public void generate(NodeLIRBuilderTool gen) {
    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, tool.emitMove(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)

Aggregations

SubstrateRegisterConfig (com.oracle.svm.core.graal.meta.SubstrateRegisterConfig)5 LIRGeneratorTool (org.graalvm.compiler.lir.gen.LIRGeneratorTool)4 RegisterValue (jdk.vm.ci.code.RegisterValue)2 LIRKind (org.graalvm.compiler.core.common.LIRKind)2 AMD64Address (org.graalvm.compiler.asm.amd64.AMD64Address)1