Skip to content
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

Make fence operations safe #180

Merged
merged 2 commits into from
Feb 15, 2024
Merged

Conversation

jsgf
Copy link
Contributor

@jsgf jsgf commented Feb 13, 2024

sfence.vma, fence and fence.i just add ordering constraints load/store operations (between themselves, or other kinds of memory access). There's no risk of any UB or other unexpected visible changes in machine state, so we can make these "safe".

Fixes #179

`sfence.vma`, `fence` and `fence.i` just add ordering constraints
load/store operations (between themselves, or other kinds of memory
access). There's no risk of any UB or other unexpected visible changes
in machine state, so we can make these "safe".
@jsgf jsgf requested a review from a team as a code owner February 13, 2024 22:56
@romancardenas
Copy link
Contributor

Looks good to me!! Please, update the CHANGELOG.md file to record your changes

@jsgf
Copy link
Contributor Author

jsgf commented Feb 14, 2024

Done

Copy link
Contributor

@romancardenas romancardenas left a comment

Choose a reason for hiding this comment

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

LGTM

@romancardenas romancardenas added this pull request to the merge queue Feb 15, 2024
Merged via the queue into rust-embedded:master with commit 539d4b7 Feb 15, 2024
95 checks passed
@jsgf jsgf deleted the safe-fence branch February 16, 2024 02:14
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.

Why are asm::fence and asm::fence_i unsafe?
2 participants