use of org.graalvm.compiler.nodes.java.ValueCompareAndSwapNode in project graal by oracle.
the class WordOperationPlugin method casOp.
protected AbstractCompareAndSwapNode casOp(JavaKind writeKind, JavaKind returnKind, AddressNode address, LocationIdentity location, ValueNode expectedValue, ValueNode newValue) {
boolean isLogic = returnKind == JavaKind.Boolean;
assert isLogic || writeKind == returnKind : writeKind + " != " + returnKind;
AbstractCompareAndSwapNode cas;
if (isLogic) {
cas = new LogicCompareAndSwapNode(address, expectedValue, newValue, location);
} else {
cas = new ValueCompareAndSwapNode(address, expectedValue, newValue, location);
}
return cas;
}
Aggregations