Skip to content

[Shared-Everything] ArrayRMW and ArrayCmpxchg #7632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
Jun 2, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
work
  • Loading branch information
kripken committed May 29, 2025
commit cc6fd35c633e004421e1634d90422e834ebd908c
3 changes: 1 addition & 2 deletions src/wasm/wasm-binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3802,8 +3802,7 @@ Result<> WasmBinaryReader::readInst() {
case BinaryConsts::ArrayAtomicRMWCmpxchg: {
auto order = getMemoryOrder(true);
auto type = getIndexedHeapType();
auto field = getU32LEB();
return builder.makeArrayCmpxchg(type, field, order);
return builder.makeArrayCmpxchg(type, order);
}
}
return Err{"unknown atomic operation " + std::to_string(op)};
Expand Down
2 changes: 1 addition & 1 deletion src/wasm/wasm-ir-builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2397,7 +2397,7 @@ Result<> IRBuilder::makeArrayCmpxchg(HeapType type, MemoryOrder order) {
CHECK_ERR(ChildPopper{*this}.visitArrayCmpxchg(&curr, type));
CHECK_ERR(validateTypeAnnotation(type, curr.ref));
push(builder.makeArrayCmpxchg(
field, curr.ref, curr.ref, curr.expected, curr.replacement, order));
curr.ref, curr.ref, curr.expected, curr.replacement, order));
return Ok{};
}

Expand Down