From bcb29e59c92347eebcd138034a4f4c06d042670a Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Mon, 10 Jul 2017 09:47:21 -0700 Subject: Add IR, parsing, printing, and binary for atomic cmpxchg (#1083) --- src/wasm.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/wasm.h') diff --git a/src/wasm.h b/src/wasm.h index e98c4db63..1f9e1c7af 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -131,7 +131,7 @@ enum HostOp { }; enum AtomicRMWOp { - Add, Sub, And, Or, Xor, Xchg, + Add, Sub, And, Or, Xor, Xchg }; // @@ -445,6 +445,15 @@ class AtomicRMW : public SpecificExpression { class AtomicCmpxchg : public SpecificExpression { public: AtomicCmpxchg() = default; + AtomicCmpxchg(MixedArena& allocator) : AtomicCmpxchg() {} + + uint8_t bytes; + Address offset; + Expression* ptr; + Expression* expected; + Expression* replacement; + + void finalize(); }; class Const : public SpecificExpression { -- cgit v1.2.3