summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2017-07-10 09:47:21 -0700
committerGitHub <noreply@github.com>2017-07-10 09:47:21 -0700
commitbcb29e59c92347eebcd138034a4f4c06d042670a (patch)
treece51ac4020bacd34c748693d85d70616bf340714 /src/wasm-binary.h
parent4995132cfaf575e430a7d0e95257b677286171c3 (diff)
downloadbinaryen-bcb29e59c92347eebcd138034a4f4c06d042670a.tar.gz
binaryen-bcb29e59c92347eebcd138034a4f4c06d042670a.tar.bz2
binaryen-bcb29e59c92347eebcd138034a4f4c06d042670a.zip
Add IR, parsing, printing, and binary for atomic cmpxchg (#1083)
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 332b4a7b6..6b984642c 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -571,6 +571,16 @@ enum AtomicOpcodes {
I64AtomicRMWXchg16U = 0x46,
I64AtomicRMWXchg32U = 0x47,
AtomicRMWOps_End = 0x47,
+
+ AtomicCmpxchgOps_Begin = 0x48,
+ I32AtomicCmpxchg = 0x48,
+ I64AtomicCmpxchg = 0x49,
+ I32AtomicCmpxchg8U = 0x4a,
+ I32AtomicCmpxchg16U = 0x4b,
+ I64AtomicCmpxchg8U = 0x4c,
+ I64AtomicCmpxchg16U = 0x4d,
+ I64AtomicCmpxchg32U = 0x4e,
+ AtomicCmpxchgOps_End = 0x4e
};
@@ -723,6 +733,7 @@ public:
void visitLoad(Load *curr);
void visitStore(Store *curr);
void visitAtomicRMW(AtomicRMW *curr);
+ void visitAtomicCmpxchg(AtomicCmpxchg *curr);
void visitConst(Const *curr);
void visitUnary(Unary *curr);
void visitBinary(Binary *curr);
@@ -881,6 +892,7 @@ public:
bool maybeVisitLoad(Expression*& out, uint8_t code, bool isAtomic);
bool maybeVisitStore(Expression*& out, uint8_t code, bool isAtomic);
bool maybeVisitAtomicRMW(Expression*& out, uint8_t code);
+ bool maybeVisitAtomicCmpxchg(Expression*& out, uint8_t code);
bool maybeVisitConst(Expression*& out, uint8_t code);
bool maybeVisitUnary(Expression*& out, uint8_t code);
bool maybeVisitBinary(Expression*& out, uint8_t code);