[cfe-dev] assembly output

Thiago Farina tfransosi at gmail.com
Tue Sep 3 04:19:00 PDT 2013


On Sun, Sep 1, 2013 at 12:15 PM, Reid Kleckner <rnk at google.com> wrote:
> What's unreadable about empty.s that's better with objdump?  It seems fine.
> Is it the .cfi directives?
>
Yeah, I think it's that.

Compare this (objdump --dissamble disa):

0000000000400510 <_Z3sumv>:
  400510: 55                   push   %rbp
  400511: 48 89 e5          mov    %rsp,%rbp
  400514: b8 03 00 00 00 mov    $0x3,%eax
  400519: 5d                   pop    %rbp
  40051a: c3                   retq
  40051b: 0f 1f 44 00 00  nopl   0x0(%rax,%rax,1)

To (clang++ -S disa.cc):

_Z3sumv:                               # @_Z3sumv
             .cfi_startproc
# BB#0:                                 # %entry
            pushq   %rbp

--
Thiago Farina
-------------- next part --------------
A non-text attachment was scrubbed...
Name: disa.cc
Type: application/octet-stream
Size: 75 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130903/fb6fee94/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: disa.s
Type: application/octet-stream
Size: 956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130903/fb6fee94/attachment-0001.obj>


More information about the cfe-dev mailing list