4

Is there a machanism to convert native machine code to llvm bytecode? If not, please give some idea how to implement it.

Thanks!

2
  • I highly doubt that any given machine code could be converted to LLVM bytecode. Perhaps some specific sequences could be converted, but writing a converter that would work on any input is likely impossible. (Or would require emulation of the target CPU inside the VM, which would of course defeat the purpose...) Commented Dec 27, 2010 at 3:23
  • I have similar question : Translation of machinecode into LLVM IR (disassembly / reassembly of X86_64. X86. ARM into LLVM bitcode) - you might be interested. Commented Aug 30, 2011 at 20:02

1 Answer 1

7

Libcpu was designed to convert machine code of various architectures to LLVM IR to facilitate writing emulators.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.