-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Correct inline assembly clobber formatting. #34682
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
Conversation
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.
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. |
r? @eddyb |
@bors r+ |
📌 Commit e32da12 has been approved by |
This currently isn't exposed by LLVM; clang currently hardcodes its own list of register names. |
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.
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.