On Reddit, Icarium-Lifestealer asked me how the disassembly looked if I used -C panic=abort
instead of extern "C"
. Curious, I tried and came out with the following assembly, which is again exactly the same as the C example
push rbx mov rbx, rdi cmp dword ptr [rdi], 43 jl .LBB3_2 mov rdi, rbx call example::bar mov dword ptr [rbx], 42 .LBB3_2: mov rdi, rbx pop rbx jmp example::baz