Skip to content
Discussion options

You must be logged in to vote

cargo-show-asm works with Rust, your example looks like C or C++ to me.

Passing --simplify in addition to usual arguments should give you a smaller output:

% cat src/lib.rs
#[inline(never)]
pub fn square(num: usize) -> usize {
    num * num
}
% cargo asm  --simplify --quiet

foo::square:
        mov rax, rdi
        imul rax, rdi
        ret

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pacak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants