-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE: Assertion `R == 0 && "Already initialized this value register!"' failed #24799
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
If you're wondering why this assert is running, it's because I'm using intel syntax without specifying the intel syntax option. Actually, no, I attempted to change it, and it didn't work... |
The smallest program that shows this behavior: #![feature(asm)]
fn main() {
let mut _test: u32;
unsafe {
asm!("mov $2, %eax" : "=a"(_test));
}
} |
Register constraints are written with #![feature(asm)]
fn main() {
let mut _test: u32;
unsafe {
asm!("mov $$2, %eax" : "={ax}"(_test));
}
} (It's not necessary to specify the exact width.) Thanks for filing but this isn't a bug. |
@huonw It is still a bug. There is an llvm assertion here. Even if this isn't correct, there should not be an llvm assertion. If this is true, then it's a bug with the documentation, where it still shows this syntax. |
With the asm! templates.
You can see the code at https://github.com/GBGamer/os-dev/blob/master/kernel/low_level.rs
The specific assertion is:
The text was updated successfully, but these errors were encountered: