-
Notifications
You must be signed in to change notification settings - Fork 71
Check if clobber_abi is correctly supported #77
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
Comments
I'm not sure what kind of check you want here. This piece makes me think that the whole handling of LLVM backend haven't been updated as well. |
Yup, I know. But I still want to check that it works. I think there's a test in Rust that checks this, so we might not have much to do. |
The test is |
You'll have to enable those codegen tests as well. |
The clobbering logic is incorrect when input and clobbered registers overlap. The let mut x = 8;
unsafe {
std::arch::asm!(
"mov rax, rdi",
in("rdi") x,
lateout("rdi") _,
);
} or equivalently let mut x = 8;
unsafe {
std::arch::asm!(
"mov rax, rdi",
in("rdi") x,
clobber_abi("sysv64"),
);
}
and it's right, in that the
This seems to be a GCC rule: input and clobber registers cannot overlap. I believe the right idea here is to treat an |
rust-lang/rust#87581
After #72 is merged.
Needs updating to a more recent nightly.
The text was updated successfully, but these errors were encountered: