Skip to content

Blog post on new inline assembly syntax - #600

Merged
nikomatsakis merged 11 commits into
rust-lang:masterfrom
joshtriplett:new-asm
Jun 8, 2020
Merged

nikomatsakis merged 11 commits into
rust-lang:masterfrom
joshtriplett:new-asm

Conversation

@joshtriplett

Copy link
Copy Markdown
Member

No description provided.

@rust-highfive

Copy link
Copy Markdown

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@joshtriplett

Copy link
Copy Markdown
Member Author

cc @Amanieu for review.

Comment thread posts/inside-rust/2020-05-25-new-inline-asm.md Outdated
Comment thread posts/inside-rust/2020-05-25-new-inline-asm.md Outdated
Comment thread posts/inside-rust/2020-05-25-new-inline-asm.md Outdated
Comment thread posts/inside-rust/2020-05-25-new-inline-asm.md Outdated
v = inout(reg) value => _,
popcnt = out(reg) popcnt,
out("rax") _, // scratch
inout("rdi") bits.as_mut_ptr() => _,

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member Author

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.

@Amanieu

Amanieu commented May 26, 2020

Copy link
Copy Markdown
Member

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.

@joshtriplett

Copy link
Copy Markdown
Member Author

@Amanieu Seems reasonable to me. And thanks for the feedback; I've updated the post.

@nikomatsakis nikomatsakis left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread posts/inside-rust/2020-05-25-new-inline-asm.md Outdated
@joshtriplett

Copy link
Copy Markdown
Member Author

@nikomatsakis Thanks for reviewing and approving.

@Amanieu Please post here as soon as you're ready for this to be posted.

@nikomatsakis

Copy link
Copy Markdown
Contributor

Please ping me before merging this PR, thanks, =)

@joshtriplett

Copy link
Copy Markdown
Member Author

@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?

@Amanieu

Amanieu commented Jun 1, 2020

Copy link
Copy Markdown
Member

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.

@joshtriplett

Copy link
Copy Markdown
Member Author

@nikomatsakis Any reservations about posting?

@nikomatsakis

Copy link
Copy Markdown
Contributor

Nope, let's post.

@nikomatsakis
nikomatsakis merged commit ebd895a into rust-lang:master Jun 8, 2020
@joshtriplett
joshtriplett deleted the new-asm branch June 8, 2020 21: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.

5 participants