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

Small improvements to asm documentation #76675

Merged
merged 2 commits into from
Sep 16, 2020
Merged

Small improvements to asm documentation #76675

merged 2 commits into from
Sep 16, 2020

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Sep 13, 2020

Save people from searching and reading tons of comments in tracking issues.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 13, 2020
@Amanieu
Copy link
Member

Amanieu commented Sep 13, 2020

The thing about wrapping operands in [] only applies to x86 so I am hesitant to include it as general advice for inline asm.

@jyn514 jyn514 added A-inline-assembly Area: Inline assembly (`asm!(…)`) A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools labels Sep 13, 2020
@tesuji
Copy link
Contributor Author

tesuji commented Sep 14, 2020

The thing about wrapping operands in [] only applies to x86 so I am hesitant to include it as general advice for inline asm.

MIPS and x86 seems to have memory address operands. x86 is popular computing target for Rust.
I think including advice for transition from old llvm_asm way to new way is really nice.
It saves people from asking for helps repeatedly.
However, I agree the current text is not good enough. Will try to improve it.

@Amanieu
Copy link
Member

Amanieu commented Sep 14, 2020

As a side note, we need a section explaining how to properly use labels in inline asm (i.e. only GAS local labels are allowed). But this can be done in a separate PR.

Co-authored-by: Amanieu <amanieu@gmail.com>
@Amanieu
Copy link
Member

Amanieu commented Sep 16, 2020

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 16, 2020

📌 Commit e82be71 has been approved by Amanieu

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 16, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 16, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#76669 (Prefer asm! over llvm_asm! in core)
 - rust-lang#76675 (Small improvements to asm documentation)
 - rust-lang#76681 (remove orphaned files)
 - rust-lang#76694 (Introduce a PartitioningCx struct)
 - rust-lang#76695 (fix syntax error in suggesting generic constraint in trait parameter)
 - rust-lang#76699 (improve const infer error)
 - rust-lang#76707 (Simplify iter flatten struct doc)
 - rust-lang#76710 (:arrow_up: rust-analyzer)
 - rust-lang#76714 (Small docs improvements)
 - rust-lang#76717 (Fix generating rustc docs with non-default lib directory.)

Failed merges:

r? `@ghost`
@bors bors merged commit 6194d7e into rust-lang:master Sep 16, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 16, 2020
@tesuji tesuji deleted the asm_doc branch September 17, 2020 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools A-inline-assembly Area: Inline assembly (`asm!(…)`) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants