use of org.graalvm.compiler.lir.gen.LIRGeneratorTool in project graal by oracle.
the class LogicCompareAndSwapNode method generate.
@Override
public void generate(NodeLIRBuilderTool gen) {
assert getNewValue().stamp(NodeView.DEFAULT).isCompatible(getExpectedValue().stamp(NodeView.DEFAULT));
assert !this.canDeoptimize();
LIRGeneratorTool tool = gen.getLIRGeneratorTool();
LIRKind resultKind = tool.getLIRKind(stamp(NodeView.DEFAULT));
Value trueResult = tool.emitConstant(resultKind, JavaConstant.TRUE);
Value falseResult = tool.emitConstant(resultKind, JavaConstant.FALSE);
Value result = tool.emitLogicCompareAndSwap(gen.operand(getAddress()), gen.operand(getExpectedValue()), gen.operand(getNewValue()), trueResult, falseResult);
gen.setResult(this, result);
}
use of org.graalvm.compiler.lir.gen.LIRGeneratorTool in project graal by oracle.
the class WriteStackPointerNode method generate.
@Override
public void generate(NodeLIRBuilderTool gen) {
LIRGeneratorTool tool = gen.getLIRGeneratorTool();
RegisterValue target = tool.getRegisterConfig().getFrameRegister().asValue(tool.getLIRKind(FrameAccess.getWordStamp()));
gen.getLIRGeneratorTool().emitMove(target, gen.operand(value));
}
use of org.graalvm.compiler.lir.gen.LIRGeneratorTool in project graal by oracle.
the class FarReturnLoweredNode method generate.
@Override
public void generate(NodeLIRBuilderTool gen) {
LIRGeneratorTool lirGenTool = gen.getLIRGeneratorTool();
AllocatableValue resultOperand = lirGenTool.resultOperandFor(result.getStackKind(), LIRKind.fromJavaKind(lirGenTool.target().arch, result.getStackKind()));
lirGenTool.emitMove(resultOperand, gen.operand(result));
((SubstrateLIRGenerator) lirGenTool).emitFarReturn(resultOperand, gen.operand(sp), gen.operand(ip));
}
use of org.graalvm.compiler.lir.gen.LIRGeneratorTool 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);
}
use of org.graalvm.compiler.lir.gen.LIRGeneratorTool in project graal by oracle.
the class ReadStackPointerNode method generate.
@Override
public void generate(NodeLIRBuilderTool gen) {
LIRGeneratorTool tool = gen.getLIRGeneratorTool();
RegisterValue input = tool.getRegisterConfig().getFrameRegister().asValue(tool.getLIRKind(FrameAccess.getWordStamp()));
gen.setResult(this, tool.emitMove(input));
}
Aggregations