[llvm-dev] JIT compiler - showing generated machine code

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 6 00:52:42 PDT 2016


On 6 Apr 2016, at 05:14, Russell Wallace via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> When using LLVM as a JIT compiler, you can use module.dump() to show the generated intermediate code, which is good.
> 
> Is there similarly a programmatic way to show the generated x64 machine code in assembly format?

If you want to do this solely for debugging, the easiest way is to print it out as hex bytes (“0xhhx”, byte) and then either pipe or redirect that output to llvm-mc.

David



More information about the llvm-dev mailing list