JuliaLang/julia — pull request #3284 by ihnorton (2013-06-04 04:22:58+00:00)
Title: RFC: Add disassembly to machine code

Still need to clean up a few things but want to RFC now -- any interest in adding this? Problems with adding dependency on MCDisassembler? I will at least split that out so it is not pulled in to codegen.

Example:

```julia
julia> function f(y)
x = 1
x+y
end

julia> disassemble(f, (Int64,))

define i64 @julia_f(i64) {
top:
%1 = add i64 %0, 1, !dbg !4770
ret i64 %1, !dbg !4770
}

julia> disassemble(f, (Int64,), true)
push	RBP
mov	RBP, RSP
lea	RAX, QWORD PTR [RDI + 1]
pop	RBP
ret
```