Skip to content

atomic fixes and clarification #24278

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 3 commits into from
Jul 30, 2025
Merged

atomic fixes and clarification #24278

merged 3 commits into from
Jul 30, 2025

Conversation

gooncreeper
Copy link
Contributor

This PR fixes the lowering of packed structs with non-power-of-two backing integers in the LLVM backend; previously LLVM would throw the error "atomic memory access' operand must have a power-of-two size". Additionally, error sets are now caught when used in atomic instructions. Furthermore, I clarified the langref on which types are allowed in atomic builtins.

@alexrp alexrp requested a review from mlugg June 27, 2025 18:35
Additionally, disable failing big-endian atomic test

also improve test paramaters to catch this when condition is removed

also some other cleanups
Floats are not allowed in @cmpxchg

Packed structs are allowed for all atomic builtins
@mlugg mlugg enabled auto-merge July 30, 2025 08:56
Copy link
Member

@mlugg mlugg left a comment

Choose a reason for hiding this comment

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

Thanks!

@mlugg mlugg merged commit 389ccf6 into ziglang:master Jul 30, 2025
10 checks passed
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.

2 participants