use of org.graalvm.compiler.lir.Variable 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 org.graalvm.compiler.lir.Variable in project graal by oracle.
the class AMD64ArithmeticLIRGenerator method emitMathPow.
@Override
public Value emitMathPow(Value input1, Value input2) {
Variable result = getLIRGen().newVariable(LIRKind.combine(input1));
getLIRGen().append(new AMD64MathIntrinsicBinaryOp(getAMD64LIRGen(), POW, result, getLIRGen().asAllocatable(input1), getLIRGen().asAllocatable(input2)));
return result;
}
use of org.graalvm.compiler.lir.Variable in project graal by oracle.
the class AMD64ArithmeticLIRGenerator method emitConvertOp.
private AllocatableValue emitConvertOp(LIRKind kind, AMD64MROp op, OperandSize size, Value input) {
Variable result = getLIRGen().newVariable(kind);
getLIRGen().append(new AMD64Unary.MROp(op, size, result, getLIRGen().asAllocatable(input)));
return result;
}
use of org.graalvm.compiler.lir.Variable in project graal by oracle.
the class AMD64ArithmeticLIRGenerator method emitBitScanForward.
@Override
public Variable emitBitScanForward(Value value) {
Variable result = getLIRGen().newVariable(LIRKind.combine(value).changeType(AMD64Kind.DWORD));
getLIRGen().append(new AMD64Unary.RMOp(BSF, QWORD, result, getLIRGen().asAllocatable(value)));
return result;
}
use of org.graalvm.compiler.lir.Variable in project graal by oracle.
the class AArch64ArithmeticLIRGenerator method emitLoad.
@Override
public Variable emitLoad(LIRKind kind, Value address, LIRFrameState state) {
AArch64AddressValue loadAddress = getLIRGen().asAddressValue(address);
Variable result = getLIRGen().newVariable(getLIRGen().toRegisterKind(kind));
getLIRGen().append(new LoadOp((AArch64Kind) kind.getPlatformKind(), result, loadAddress, state));
return result;
}
Aggregations