pacak / cargo-show-asm

cargo subcommand showing the assembly, LLVM-IR and MIR generated for Rust code
Apache License 2.0
712 stars 35 forks source link

When printing asm also include relevant constants #261

Closed pacak closed 7 months ago

pacak commented 7 months ago
.section .text.sample::panics,"ax",@progbits
        .globl  sample::panics
        .p2align        4, 0x90
        .type   sample::panics,@function
sample::panics:
        .cfi_startproc
        sub rsp, 56
        .cfi_def_cfa_offset 64
        lea rax, [rip + .L__unnamed_7]
        mov qword ptr [rsp + 8], rax
        mov qword ptr [rsp + 16], 1
        mov rax, rsp
        mov qword ptr [rsp + 24], rax
        vxorps xmm0, xmm0, xmm0
        vmovups xmmword ptr [rsp + 32], xmm0
        lea rsi, [rip + .L__unnamed_8]
        lea rdi, [rsp + 8]
        call qword ptr [rip + core::panicking::panic_fmt@GOTPCREL]

.section .rodata..L__unnamed_16,"a",@progbits
.L__unnamed_16:
        .ascii  "oh noes asdf wef wef wf wefwefwef wef! bob"
        .size   .L__unnamed_16, 42

.section .data.rel.ro..L__unnamed_7,"aw",@progbits
        .p2align        3, 0x0
.L__unnamed_7:
        .quad   .L__unnamed_16
        .asciz  "*\000\000\000\000\000\000"
        .size   .L__unnamed_7, 16

.section .rodata..L__unnamed_17,"a",@progbits
.L__unnamed_17:
        .ascii  "src/lib.rs"
        .size   .L__unnamed_17, 10

.section .data.rel.ro..L__unnamed_8,"aw",@progbits
        .p2align        3, 0x0
.L__unnamed_8:
        .quad   .L__unnamed_17
        .asciz  "\n\000\000\000\000\000\000\000%\000\000\000\005\000\000"
        .size   .L__unnamed_8, 24

Fixes #22