Search in sources :

Example 1 with ValueCompareAndSwapNode

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;
}
Also used : LogicCompareAndSwapNode(org.graalvm.compiler.nodes.java.LogicCompareAndSwapNode) ValueCompareAndSwapNode(org.graalvm.compiler.nodes.java.ValueCompareAndSwapNode) AbstractCompareAndSwapNode(org.graalvm.compiler.nodes.java.AbstractCompareAndSwapNode)

Aggregations

AbstractCompareAndSwapNode (org.graalvm.compiler.nodes.java.AbstractCompareAndSwapNode)1 LogicCompareAndSwapNode (org.graalvm.compiler.nodes.java.LogicCompareAndSwapNode)1 ValueCompareAndSwapNode (org.graalvm.compiler.nodes.java.ValueCompareAndSwapNode)1