-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Implement read_volatile and write_volatile #31761
Conversation
/// | ||
/// Volatile operations are intended to act on I/O memory, and are guaranteed | ||
/// to not be elided or reordered by the compiler across other volatile | ||
/// operations. See the LLVM documentation on [[volatile]]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh weird, does markdown work like this? I thought only one set of brackets was needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copied this from the documentation in the intrinsics
module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok!
Looks good to me, thanks @Amanieu! Let's land these as unstable yeah to start out and we can likely stabilize them during the next cycle! |
Oh right, sorry, forgot to ask as well, but can you add some tests which just exercise these a bit? |
Is there a way to make a test that checks that some specific LLVM IR is generated? |
In |
I added a test. |
Tracking issue: #31756 RFC: rust-lang/rfcs#1467 I've made these unstable for now. Should they be stabilized straight away since we've had plenty of experience with people using the unstable intrinsics?
💔 Test failed - auto-mac-64-nopt-t |
@bors: retry On Sat, Feb 20, 2016 at 5:53 PM, bors [email protected] wrote:
|
⚡ Previous build results for auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-linux-cross-opt, auto-linux-musl-64-opt, auto-mac-64-opt, auto-win-gnu-64-nopt-t, auto-win-msvc-32-opt are reusable. Rebuilding only auto-linux-64-debug-opt, auto-mac-32-opt, auto-mac-64-nopt-t, auto-mac-ios-opt, auto-win-gnu-32-nopt-t, auto-win-gnu-32-opt, auto-win-gnu-64-opt, auto-win-msvc-64-opt... |
Tracking issue: #31756
RFC: rust-lang/rfcs#1467
I've made these unstable for now. Should they be stabilized straight away since we've had plenty of experience with people using the unstable intrinsics?