Skip to content

Instantly share code, notes, and snippets.

@bryant
Created January 23, 2014 05:38
Show Gist options
  • Save bryant/8573463 to your computer and use it in GitHub Desktop.
Save bryant/8573463 to your computer and use it in GitHub Desktop.
dump
0000000000000000 <main>:
#include <memory>
#include <vector>
int main() { std::unique_ptr<int> p(new int(89)); return *p; }
0: 55 push %rbp
1: 48 89 e5 mov %rsp,%rbp
4: 53 push %rbx
5: 48 83 ec 18 sub $0x18,%rsp
9: bf 04 00 00 00 mov $0x4,%edi
e: e8 00 00 00 00 callq 13 <main+0x13>
13: c7 00 59 00 00 00 movl $0x59,(%rax)
19: 48 8d 55 e0 lea -0x20(%rbp),%rdx
1d: 48 89 c6 mov %rax,%rsi
20: 48 89 d7 mov %rdx,%rdi
23: e8 00 00 00 00 callq 28 <main+0x28>
28: 48 8d 45 e0 lea -0x20(%rbp),%rax
2c: 48 89 c7 mov %rax,%rdi
2f: e8 00 00 00 00 callq 34 <main+0x34>
34: 8b 18 mov (%rax),%ebx
36: 48 8d 45 e0 lea -0x20(%rbp),%rax
3a: 48 89 c7 mov %rax,%rdi
3d: e8 00 00 00 00 callq 42 <main+0x42>
42: 89 d8 mov %ebx,%eax
44: eb 08 jmp 4e <main+0x4e>
46: 48 89 c7 mov %rax,%rdi
49: e8 00 00 00 00 callq 4e <main+0x4e>
4e: 48 83 c4 18 add $0x18,%rsp
52: 5b pop %rbx
53: 5d pop %rbp
54: c3 retq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment