Skip to content

fix: implement threads/atomics instruction parsing and validation#161

Merged
avrabe merged 1 commit intomainfrom
fix/threads-atomics-v2
Mar 17, 2026
Merged

fix: implement threads/atomics instruction parsing and validation#161
avrabe merged 1 commit intomainfrom
fix/threads-atomics-v2

Conversation

@avrabe
Copy link
Collaborator

@avrabe avrabe commented Mar 17, 2026

Summary

  • Add complete 0xFE prefix handler for all 79 atomic instruction opcodes
  • Add validator with correct stack effects for all atomic instructions
  • Add spectest shared_memory import support

Test plan

  • atomic.wast: 249/249
  • Full WAST suite: 63,806 → 64,056 (+250)

Trace: skip

🤖 Generated with Claude Code

Add complete 0xFE prefix handler for all 79 atomic instruction opcodes:
- memory.atomic.notify/wait32/wait64, atomic.fence
- Atomic loads/stores (i32/i64, 8/16/32-bit variants)
- Atomic RMW ops (add/sub/and/or/xor/xchg/cmpxchg, all width variants)

Add validator support for all atomic instructions with correct stack
effects. Add spectest shared_memory import support.

Execution was already implemented — this enables parsing and validation
so modules can actually load and run.

WAST conformance: 63,806 → 64,056 passed (+250).

Trace: skip

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit 4b5e0f9 into main Mar 17, 2026
@avrabe avrabe deleted the fix/threads-atomics-v2 branch March 17, 2026 05:14
@github-actions
Copy link

🔍 Build Diagnostics Report

Summary

Metric Base Branch This PR Change
Errors 0 0 0
Warnings 2 2 0

🎯 Impact Analysis

Issues in Files You Modified

  • 0 new errors introduced by your changes
  • 0 new warnings introduced by your changes
  • 0 total errors in modified files
  • 0 total warnings in modified files
  • 0 files you modified

Cascading Issues (Your Changes Breaking Other Files)

  • 0 new errors in unchanged files
  • 0 new warnings in unchanged files
  • 0 unchanged files now affected

Note: "Cascading issues" are errors in files you didn't modify, caused by your changes (e.g., breaking API changes, dependency issues).

✅ No Issues Detected

Perfect! Your changes don't introduce any new errors or warnings, and don't break any existing code.


📊 Full diagnostic data available in workflow artifacts

🔧 To reproduce locally:

# Install cargo-kiln
cargo install --path cargo-kiln

# Analyze your changes
cargo-kiln build --output json --filter-severity error
cargo-kiln check --output json --filter-severity warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant