MC to LLVM disassembler?

Thanks for your response. In your experience, was it worth the conversion hassle and code expansion to have the code in a platform-independent SSA form and be able to apply LLVM-based analysis tools? Or is it better to convert to another IR (such as BAP[1]) and work in that form?


[1] Binary Analysis Platform,

I am not familiar with BAP, but taking a quick look, it seems like using the two together might produce the best results. Using BAP to lift assembly into an SSA form then translating that to LLVM’s version of SSA and using LLVM’s optimizations to clean it up.

My project is currently independent of LLVM, it just so happens that a text dump of the output looks very similar to LLVM IR (once I learned of LLVM, I started using its syntax in a lot of places)

One of the really difficult parts is properly lifting an assembly instruction into its SSA equivalent. This is not terribly complicated in and of itself, but given the shear number of instructions in a typical processors instruction requires a lot of work and presents many opportunity for mistakes that would be amplified by subsequent analysis. In my opinion, this alone would be a reason to look to something like BAP as it has done the work and has controls in places to help insure it is done correctly.