| // Copyright 2018 the V8 project authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #ifndef WASM_ATOMICOP_UTILS_H |
| #define WASM_ATOMICOP_UTILS_H |
| #include "test/cctest/cctest.h" |
| #include "test/cctest/compiler/value-helper.h" |
| #include "test/cctest/wasm/wasm-run-utils.h" |
| #define OPERATION_LIST(V) \ |
| using Uint64BinOp = uint64_t (*)(uint64_t, uint64_t); |
| using Uint32BinOp = uint32_t (*)(uint32_t, uint32_t); |
| using Uint16BinOp = uint16_t (*)(uint16_t, uint16_t); |
| using Uint8BinOp = uint8_t (*)(uint8_t, uint8_t); |
| T CompareExchange(T initial, T a, T b) { |
| if (initial == a) return b; |