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

Implement read_volatile and write_volatile #31761

Merged
merged 2 commits into from
Feb 21, 2016
Merged

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Feb 18, 2016

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?

///
/// 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]].
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, ok!

@alexcrichton
Copy link
Member

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!

@alexcrichton
Copy link
Member

Oh right, sorry, forgot to ask as well, but can you add some tests which just exercise these a bit?

@Amanieu
Copy link
Member Author

Amanieu commented Feb 19, 2016

Is there a way to make a test that checks that some specific LLVM IR is generated?

@alexcrichton
Copy link
Member

In src/test/codegen, yes, but I'd also be fine with just a smoke test that uses these to make sure the compiler doesn't panic on them or something weird like that

@Amanieu
Copy link
Member Author

Amanieu commented Feb 20, 2016

I added a test.

@alexcrichton
Copy link
Member

@bors: r+ 3b67e46

bors added a commit that referenced this pull request Feb 21, 2016
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?
@bors
Copy link
Contributor

bors commented Feb 21, 2016

⌛ Testing commit 3b67e46 with merge a2fb48e...

@bors
Copy link
Contributor

bors commented Feb 21, 2016

💔 Test failed - auto-mac-64-nopt-t

@alexcrichton
Copy link
Member

@bors: retry

On Sat, Feb 20, 2016 at 5:53 PM, bors [email protected] wrote:

[image: 💔] Test failed - auto-mac-64-nopt-t
http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/8165


Reply to this email directly or view it on GitHub
#31761 (comment).

@bors bors merged commit 3b67e46 into rust-lang:master Feb 21, 2016
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.

4 participants