[LLVMdev] Creating a tablegen backend

Durward McDonell durward.mcdonell at gmail.com
Thu Aug 19 19:24:52 PDT 2010


>  Why not use LLVM-IR as your 'generic assembly'?

I should have been more specific about my goals.  I want to read
a (x86) binary, and output code in this other language.  I do not have
access to the source.  The target language might be negotiable, but
for the moment is fixed at what it is.  My big hope is that I can leverage
the semantics that are stored in the X86*.td files, hopefully by implementing
a small number of primitives, rather than by having to analyze every X86
instruction myself (not going to happen).

If there is a convenient way to convert x86 binary into LLVM-IR, that would
be an interesting avenue to explore.  I briefly looked at a post about an
LLVM-based decompiler, and even compiled and ran it, but it did not appear
to be mature enough for our needs yet.

For the record, I am not concerned about parsing ELF, doing relocations,
etc.  Right now I am just focused on converting the binary.

Thanks for your response.

--
Durward McDonell
durward.mcdonell at gmail.com




More information about the llvm-dev mailing list