Skip to content

Conversation

@stevenfontanella
Copy link
Member

@stevenfontanella stevenfontanella commented Jan 20, 2026

Part of #8165. test/spec/relaxed-atomics2.wast was generated by the script. Binary tests will be added in the next PR.

Will add missing instructions e.g. load8, i64 instructions, etc once the approach looks good.

The ruff warning for E741 probably isn't triggering anymore, but I chose to disable it because it disallows variables named l because it could be confused with I which I think isn't relevant in text editors.

@stevenfontanella stevenfontanella changed the title Add script to generate spec test Add script to generate relaxed atomics spec test Jan 20, 2026
@stevenfontanella stevenfontanella marked this pull request as ready for review January 20, 2026 23:31
@stevenfontanella
Copy link
Member Author

I had a mistake with the section's length calculation, which was only coincidentally correct when 2 instructions were being tested. I fixed it now and tested it locally with more ops.

stevenfontanella added a commit that referenced this pull request Jan 23, 2026
Part of #8165. Fuzzing and library support will be added in a future PR
with all instructions together. relaxed-atomics.wast is updated using
the WIP script in #8220.
@stevenfontanella stevenfontanella changed the title Add script to generate relaxed atomics spec test Add initial script to generate relaxed atomics spec test Jan 27, 2026
@stevenfontanella
Copy link
Member Author

stevenfontanella commented Jan 27, 2026

I more or less started over and fixed the handling for i32 vs i64 (the earlier iteration wouldn't making the memory index match the memory that we're accessing e.g. (i64.const ...) when accessing the 64-bit memory).

I'll add the text tests first and then do the binary tests in the next PR. In the meantime, I'll keep the existing relaxed-atomics.wast test. This script populates relaxed-atomics2.wast.

Copy link

@rmahdav rmahdav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Steven.

@stevenfontanella stevenfontanella enabled auto-merge (squash) January 27, 2026 23:30
@stevenfontanella stevenfontanella merged commit f6871f4 into main Jan 28, 2026
17 checks passed
@stevenfontanella stevenfontanella deleted the generate-spec-test branch January 28, 2026 00:12
@stevenfontanella stevenfontanella linked an issue Jan 28, 2026 that may be closed by this pull request
5 tasks
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.

Support for acquire/release semantics in atomics

4 participants