-
Notifications
You must be signed in to change notification settings - Fork 293
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
Blog post on new inline assembly syntax #600
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
cc @Amanieu for review. |
v = inout(reg) value => _, | ||
popcnt = out(reg) popcnt, | ||
out("rax") _, // scratch | ||
inout("rdi") bits.as_mut_ptr() => _, |
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.
options(nostack)
could be used here.
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.
This doesn't seem to make any difference in the generated code.
Along the same lines, I could use option(readonly)
in the syscall
example, but I don't think doing so adds any value. These are supposed to be very simple examples, and people will have the full RFC available for reference.
I'd like to hold the blog post back a bit while we sort out the various ICEs with the new inline asm (#72570, #72484). At least until we get fixes for those into nightly. |
@Amanieu Seems reasonable to me. And thanks for the feedback; I've updated the post. |
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.
Looks good to me! One nit.
@nikomatsakis Thanks for reviewing and approving. @Amanieu Please post here as soon as you're ready for this to be posted. |
Please ping me before merging this PR, thanks, =) |
@Amanieu It looks like both of the issues you referenced have been fixed. Are there any other things you want to wait for before this gets posted? |
I think it should be fine to post now. There are a few pending issues but they are only related to diagnostics (rust-lang/rust#72825 and rust-lang/rust#40555) and won't affect usability. |
@nikomatsakis Any reservations about posting? |
Nope, let's post. |
No description provided.