use of jdk.vm.ci.code.RegisterValue in project graal by oracle.
the class AMD64LIRGenerator method emitArrayCompareTo.
@Override
public Variable emitArrayCompareTo(JavaKind kind1, JavaKind kind2, Value array1, Value array2, Value length1, Value length2) {
LIRKind resultKind = LIRKind.value(AMD64Kind.DWORD);
RegisterValue raxRes = AMD64.rax.asValue(resultKind);
RegisterValue cnt1 = AMD64.rcx.asValue(length1.getValueKind());
RegisterValue cnt2 = AMD64.rdx.asValue(length2.getValueKind());
emitMove(cnt1, length1);
emitMove(cnt2, length2);
append(new AMD64ArrayCompareToOp(this, kind1, kind2, raxRes, array1, array2, cnt1, cnt2));
Variable result = newVariable(resultKind);
emitMove(result, raxRes);
return result;
}
use of jdk.vm.ci.code.RegisterValue in project graal by oracle.
the class AMD64LIRGenerator method emitStringIndexOf.
@Override
public Variable emitStringIndexOf(Value source, Value sourceCount, Value target, Value targetCount, int constantTargetCount) {
Variable result = newVariable(LIRKind.value(AMD64Kind.DWORD));
RegisterValue cnt1 = AMD64.rdx.asValue(sourceCount.getValueKind());
emitMove(cnt1, sourceCount);
RegisterValue cnt2 = AMD64.rax.asValue(targetCount.getValueKind());
emitMove(cnt2, targetCount);
append(new AMD64StringIndexOfOp(this, result, source, target, cnt1, cnt2, AMD64.rcx.asValue(), AMD64.xmm0.asValue(), constantTargetCount, getVMPageSize()));
return result;
}
use of jdk.vm.ci.code.RegisterValue in project graal by oracle.
the class AMD64LIRGenerator method emitCompareAndSwapBranch.
public void emitCompareAndSwapBranch(ValueKind<?> kind, AMD64AddressValue address, Value expectedValue, Value newValue, Condition condition, LabelRef trueLabel, LabelRef falseLabel, double trueLabelProbability) {
assert kind.equals(expectedValue.getValueKind());
assert kind.equals(newValue.getValueKind());
assert condition == Condition.EQ || condition == Condition.NE;
AMD64Kind memKind = (AMD64Kind) kind.getPlatformKind();
RegisterValue raxValue = AMD64.rax.asValue(kind);
emitMove(raxValue, expectedValue);
append(new CompareAndSwapOp(memKind, raxValue, address, raxValue, asAllocatable(newValue)));
append(new BranchOp(condition, trueLabel, falseLabel, trueLabelProbability));
}
use of jdk.vm.ci.code.RegisterValue in project graal by oracle.
the class AMD64LIRGenerator method emitValueCompareAndSwap.
@Override
public Value emitValueCompareAndSwap(Value address, Value expectedValue, Value newValue) {
ValueKind<?> kind = newValue.getValueKind();
assert kind.equals(expectedValue.getValueKind());
AMD64Kind memKind = (AMD64Kind) kind.getPlatformKind();
AMD64AddressValue addressValue = asAddressValue(address);
RegisterValue raxRes = AMD64.rax.asValue(kind);
emitMove(raxRes, expectedValue);
append(new CompareAndSwapOp(memKind, raxRes, addressValue, raxRes, asAllocatable(newValue)));
Variable result = newVariable(kind);
emitMove(result, raxRes);
return result;
}
use of jdk.vm.ci.code.RegisterValue 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));
}
Aggregations