diff options
Diffstat (limited to 'src/wasm')
-rw-r--r-- | src/wasm/wasm-binary.cpp | 2 | ||||
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 12 | ||||
-rw-r--r-- | src/wasm/wasm-stack.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index 80f82dd5e..d9ddaa614 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -3416,7 +3416,7 @@ bool WasmBinaryBuilder::maybeVisitAtomicRMW(Expression*& out, uint8_t code) { // Set curr to the given opcode, type and size. #define SET(opcode, optype, size) \ - curr->op = opcode; \ + curr->op = RMW##opcode; \ curr->type = optype; \ curr->bytes = size diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 4e06a75bb..f28ea9f18 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -1409,17 +1409,17 @@ Expression* SExpressionWasmBuilder::makeAtomicRMW(Element& s, ret->type = type; ret->bytes = bytes; if (!strncmp(extra, "add", 3)) { - ret->op = Add; + ret->op = RMWAdd; } else if (!strncmp(extra, "and", 3)) { - ret->op = And; + ret->op = RMWAnd; } else if (!strncmp(extra, "or", 2)) { - ret->op = Or; + ret->op = RMWOr; } else if (!strncmp(extra, "sub", 3)) { - ret->op = Sub; + ret->op = RMWSub; } else if (!strncmp(extra, "xor", 3)) { - ret->op = Xor; + ret->op = RMWXor; } else if (!strncmp(extra, "xchg", 4)) { - ret->op = Xchg; + ret->op = RMWXchg; } else { throw ParseException("bad atomic rmw operator", s.line, s.col); } diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index 4bc479d15..13ce700a5 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -351,7 +351,7 @@ void BinaryInstWriter::visitAtomicRMW(AtomicRMW* curr) { o << int8_t(BinaryConsts::AtomicPrefix); #define CASE_FOR_OP(Op) \ - case Op: \ + case RMW##Op: \ switch (curr->type.getBasic()) { \ case Type::i32: \ switch (curr->bytes) { \ |