Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Use volatile read for ICSR register #315

Merged
merged 2 commits into from
Mar 2, 2021

Conversation

lulf
Copy link
Contributor

@lulf lulf commented Feb 25, 2021

This prevents the compiler from optimizing the read.

Edit: I also added a change to include the 9th bit in the IRQ. I can leave that out if it would break anything.

#314

This prevents the compiler from optimizing the read
@lulf lulf requested a review from a team as a code owner February 25, 2021 14:05
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @adamgreig (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

The 9th bit is needed to all 480 interrupts on Cortex-M33
Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

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

Thanks, looks good! Keeping the top bit makes sense here since it was already an i16 variable type.

This will also close #314.

bors merge

bors bot added a commit that referenced this pull request Mar 2, 2021
315: Use volatile read for ICSR register r=adamgreig a=lulf

This prevents the compiler from optimizing the read.

Edit: I also added a change to include the 9th bit in the IRQ. I can leave that out if it would break anything. 

#314

Co-authored-by: Ulf Lilleengen <ulf.lilleengen@gmail.com>
@bors
Copy link
Contributor

bors bot commented Mar 2, 2021

Build failed:

@adamgreig
Copy link
Member

bors retry

@bors
Copy link
Contributor

bors bot commented Mar 2, 2021

@bors bors bot merged commit 1514f97 into rust-embedded:master Mar 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants