use of org.graalvm.compiler.lir.sparc.SPARCMove.CompareAndSwapOp in project graal by oracle.
the class SPARCHotSpotLIRGenerator method emitLogicCompareAndSwap.
@Override
public Variable emitLogicCompareAndSwap(Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue) {
ValueKind<?> kind = newValue.getValueKind();
assert kind.equals(expectedValue.getValueKind());
SPARCKind memKind = (SPARCKind) kind.getPlatformKind();
Variable result = newVariable(newValue.getValueKind());
append(new CompareAndSwapOp(result, asAllocatable(address), asAllocatable(expectedValue), asAllocatable(newValue)));
return emitConditionalMove(memKind, expectedValue, result, Condition.EQ, true, trueValue, falseValue);
}
use of org.graalvm.compiler.lir.sparc.SPARCMove.CompareAndSwapOp in project graal by oracle.
the class SPARCHotSpotLIRGenerator method emitValueCompareAndSwap.
@Override
public Variable emitValueCompareAndSwap(Value address, Value expectedValue, Value newValue) {
ValueKind<?> kind = newValue.getValueKind();
assert kind.equals(expectedValue.getValueKind());
Variable result = newVariable(newValue.getValueKind());
append(new CompareAndSwapOp(result, asAllocatable(address), asAllocatable(expectedValue), asAllocatable(newValue)));
return result;
}
Aggregations