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

Correct inline assembly clobber formatting. #34682

Merged
merged 1 commit into from
Jul 8, 2016

Conversation

CensoredUsername
Copy link
Contributor

Fixes the formatting for inline assembly clobbers used in the book.
As this causes llvm to silently ignore the clobber an error is also
added to catch cases in which the wrong formatting was used.
Additionally a test case is added to confirm that this error works.

This fixes #34458

Note: this is only one out of a few possible ways to fix the issue
depending on how the asm! macro formatting is wanted.

Additionally, it'd be nicer to have some kind of test or feedback
from llvm if the clobber constraints are valid, but I do not know
enough about llvm to say if or how this is possible.

Fixes the formatting for inline assembly clobbers used in the book.
As this causes llvm to silently ignore the clobber an error is also
added to catch cases in which the wrong formatting was used.
Additionally a test case is added to confirm that this error works.
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Manishearth (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@Manishearth
Copy link
Member

r? @eddyb

@rust-highfive rust-highfive assigned eddyb and unassigned Manishearth Jul 6, 2016
@eddyb
Copy link
Member

eddyb commented Jul 6, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Jul 6, 2016

📌 Commit e32da12 has been approved by eddyb

@eefriedman
Copy link
Contributor

Additionally, it'd be nicer to have some kind of test or feedback
from llvm if the clobber constraints are valid, but I do not know
enough about llvm to say if or how this is possible.

This currently isn't exposed by LLVM; clang currently hardcodes its own list of register names.

@bors
Copy link
Contributor

bors commented Jul 8, 2016

⌛ Testing commit e32da12 with merge 9b4e2a5...

bors added a commit that referenced this pull request Jul 8, 2016
Correct inline assembly clobber formatting.

Fixes the formatting for inline assembly clobbers used in the book.
As this causes llvm to silently ignore the clobber an error is also
added to catch cases in which the wrong formatting was used.
Additionally a test case is added to confirm that this error works.

This fixes #34458

Note: this is only one out of a few possible ways to fix the issue
depending on how the asm! macro formatting is wanted.

Additionally, it'd be nicer to have some kind of test or feedback
from llvm if the clobber constraints are valid, but I do not know
enough about llvm to say if or how this is possible.
@bors bors merged commit e32da12 into rust-lang:master Jul 8, 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.

Inline assembly clobber formatting mismatch
6 participants