[LLVMdev] Any idea on translate x86 assembly to LLVM IR?

Holger Schurig hs4233 at mail.mn-solutions.de
Mon Mar 3 22:44:56 PST 2008


> I'am now considering converting x86 machine assembly into LLVM
> IR, does anyone know about any existing project or resource
> related to this area? Any difficulities or any ideas on this?

There is a idea floating around that LLVM and QEMU could be 
married. QEMU has sort-of-a-disassembler, where they generate 
little pieces of code and later let that code execute (it's 
actually a bit different, but hey, use the source). The idea was 
to replace that part with an LLVM IR generation. Then you can 
use standard LLVM optimization passes on this and/or run this 
code via JIT.

Anyway, the disassembler-part of QEMU is easy to rip out, for me 
it was easier than, say, the libbfd based disassemblers, which 
are highly optimized to produce human readable strings.



More information about the llvm-dev mailing list