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

inline-asm #20

Closed
nikomatsakis opened this issue Jun 11, 2020 · 11 comments
Closed

inline-asm #20

nikomatsakis opened this issue Jun 11, 2020 · 11 comments
Assignees
Labels
lang-initiative An active lang team initiative

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Jun 11, 2020

Summary

Pursuing a stable notation for inline assembly.

Links

@nikomatsakis nikomatsakis added the lang-initiative An active lang team initiative label Jun 11, 2020
@nikomatsakis
Copy link
Contributor Author

2020-06-15:

Some updates:

  • Inside Rust blog post was posted which got a lot of feedback, some of which is captured into the tracking issue.
  • Common problem is that people aren't sure how to format, and we took a first pass at writing up a style RFC. Team is kind of dormant right now but would be good to rev up and take a look at this.
  • This revealed that multi-line inline assembly is hard to format, so we discussed the idea of multiple strings, one per logical line of assembly, which gives rustfmt a lot more freedom. Implemented in PR asm: Allow multiple template string arguments; interpret them as newline-separated rust#73364.

@joshtriplett
Copy link
Member

Style RFC (Needs updating for the new multi-line style)

@nikomatsakis
Copy link
Contributor Author

2020-06-22:

  • Change to allow multiple logical lines of inline assembly has been merged.
  • Blog post example has been updated so that people have that available.
  • This means people can write code that rustfmt can properly indent, should offer substantial formatting improvements.
  • Still awaiting checkmarks on the RFC. No blocking issues that folks in meeting are aware of.

@nikomatsakis
Copy link
Contributor Author

nikomatsakis commented Jul 6, 2020

2020-07-06:

  • RFC Inline assembly rfcs#2873 is in FCP and has 3 more days to go.
  • Next step would be for this to go through a "validation period" of several releases (at least) to check the design, no rush to stabilize, though we do feel it is in a state to be stabilized, presuming nothing arises (would be nice to try to stabilize this sometime in 2021 if not before).

@Lokathor

This comment has been minimized.

@nikomatsakis
Copy link
Contributor Author

nikomatsakis commented Jul 20, 2020

2020-07-20:

  • RFC Inline assembly rfcs#2873 is ready to merge.
  • Status: Implemented, just needs some time to bake. Probably at this point we want to 'hold off' for some period of time. Shooting to stabilize "early next year", most likely. Won't paste comments until there are major updates.

@nikomatsakis
Copy link
Contributor Author

2020-09-21:

  • There's been some implementation work towards adding MIPS support, which would be a good sign that it's possible to evolve this forward towards adding more architectures.

@Amanieu
Copy link
Member

Amanieu commented Sep 21, 2020

In fact we've already had PRs adding support for NVPTX and Hexagon.

@nikomatsakis
Copy link
Contributor Author

2020-10-19:

  • Some renewed discussion on whether inline assembly should be exposed as asm! or core::arch::TARGET::asm!.
  • Most of the time your assembly is target specific. But there are also cases where it's used in a surprisingly portable way (32, 64 bit, for example, or custom directives).
  • This will require a decision before stabilization, recommend creating an issue with a proposal and the pros/cons and other considerations at that point.
  • Some issues around LLVM version checking but new release may help.

@joshtriplett
Copy link
Member

2021-02-03: update on stabilization blockers at rust-lang/rust#72016 (comment)

@nikomatsakis
Copy link
Contributor Author

Stabilized!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-initiative An active lang team initiative
Projects
None yet
Development

No branches or pull requests

4 participants