asmdiff

python
mit

A tool to compare per-function C assembly across compilers and revisions.

asmdiff is a command-line tool for comparing the generated assembly of C functions/files across implementations, compiler flags, versions, and source revisions or from an ELF binary.

 

It compiles harnesses or project sources across a matrix of compilers, pair functions, prints side-by-side listings, and summarizes instruction counts, loop spans and outbound calls to give you an analysis of the (before / after) compiled difference in assembly. It can also borrow flags from a compile_commands.json file and can output JSON for scripts. 

 

The calls column in asmdiff shows whether a C construct is inlined or became a hidden libcall and it reads shipped ELF binaries. It can also be used in testing scenarios or automated CIs for regression checks.

 

This is a tool that assists compiler engineers, embedded firmware developers, low-level performance engineers, and C programmers who need to compare the generated assembly of C functions during and after refactors. It is also useful when you need to see what actually compiled with different compiler flags to find the cause of a bug or a regression.

Get Updates On Terminal Trove.

No spam, just updates on Terminal Trove. See an example update.