-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
$1 in asm with only one operand silently chooses some arbitrary register #13370
Comments
Triage: appears to be the same today. |
Triage: https://is.gd/aLBo9e reproduces. |
It seems that LLVM does in fact index into the clobber list. If a clobber is specified, the errant operand will change to whatever was specified first in the clobber list. For example:
will change the error to
and if the clobber list is changed to Also of note is that an out-of-bounds index will cause a compiler crash:
I'm thinking about writing a patch to just check that all indices are in bounds before giving the asm template string to LLVM. |
This issue does not apply to the new The legacy |
Fix possible typo in `ptr_arg` lint This fixes a possible typo in the [`ptr_arg`](https://rust-lang.github.io/rust-clippy/master/index.html#/ptr_arg) lint. I'm new to Rust, so apologies if I misunderstood the meaning of this lint. changelog: [`ptr_arg`]: Fix typo ("size" -> "type")
produces
And
gives
Possibly it indexes into the clobbers list. If I add a
"rax"
clobber to the latter example, I getxor %rax, %rax
.The text was updated successfully, but these errors were encountered: