We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#[inline(never)] fn repro(buffer: &mut itoa::Buffer, n: i32) -> &str { buffer.format(n) } fn main() { println!("{}", repro(&mut itoa::Buffer::new(), i32::MIN)); }
The x86_64 assembly for repro is:
repro
mov rax, rdi mov edx, 11 movabs rcx, 3905527098775974194 mov word ptr [rdi + 9], 14388 mov qword ptr [rdi + 1], rcx mov byte ptr [rdi], 45 ret
The string returned by repro is "-2147483648". The four immediates visible in the assembly are:
A better implementation might be able to compile to just 3 immediates.
The text was updated successfully, but these errors were encountered:
Desired output:
mov rax, rdi mov edx, 11 movabs rcx, 3690757306333606445 mov dword ptr [rdi + 7], 942945843 mov qword ptr [rdi], rcx ret
Sorry, something went wrong.
No branches or pull requests
The x86_64 assembly for
repro
is:The string returned by
repro
is "-2147483648". The four immediates visible in the assembly are:A better implementation might be able to compile to just 3 immediates.
The text was updated successfully, but these errors were encountered: