Skip to content

Instantly share code, notes, and snippets.

@timkofu
Last active April 26, 2018 13:37
Show Gist options
  • Save timkofu/92323e82d7ac1a581787e057a005d0fd to your computer and use it in GitHub Desktop.
Save timkofu/92323e82d7ac1a581787e057a005d0fd to your computer and use it in GitHub Desktop.
.file "test_g++_flags_speedup.cpp"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 8
.LC0:
.string "The billionth fibonacci number is: "
.section .text.startup,"ax",@progbits
.p2align 4,,15
.globl main
.type main, @function
main:
.LFB1564:
.cfi_startproc
pushq %rbx
.cfi_def_cfa_offset 16
.cfi_offset 3, -16
movl $1000000000, %eax
movl $1, %ebx
xorl %edx, %edx
.p2align 4,,10
.p2align 3
.L2:
leaq (%rdx,%rbx), %rcx
movq %rbx, %rdx
movq %rcx, %rbx
subl $1, %eax
jne .L2
movl $35, %edx
leaq .LC0(%rip), %rsi
leaq _ZSt4cout(%rip), %rdi
call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@PLT
movq %rbx, %rsi
leaq _ZSt4cout(%rip), %rdi
call _ZNSo9_M_insertIyEERSoT_@PLT
movq %rax, %rdi
call _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
xorl %eax, %eax
popq %rbx
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE1564:
.size main, .-main
.p2align 4,,15
.type _GLOBAL__sub_I_main, @function
_GLOBAL__sub_I_main:
.LFB2054:
.cfi_startproc
subq $8, %rsp
.cfi_def_cfa_offset 16
leaq _ZStL8__ioinit(%rip), %rdi
call _ZNSt8ios_base4InitC1Ev@PLT
movq _ZNSt8ios_base4InitD1Ev@GOTPCREL(%rip), %rdi
addq $8, %rsp
.cfi_def_cfa_offset 8
leaq __dso_handle(%rip), %rdx
leaq _ZStL8__ioinit(%rip), %rsi
jmp __cxa_atexit@PLT
.cfi_endproc
.LFE2054:
.size _GLOBAL__sub_I_main, .-_GLOBAL__sub_I_main
.section .init_array,"aw"
.align 8
.quad _GLOBAL__sub_I_main
.local _ZStL8__ioinit
.comm _ZStL8__ioinit,1,1
.hidden __dso_handle
.ident "GCC: (Ubuntu 7.3.0-16ubuntu3) 7.3.0"
.section .note.GNU-stack,"",@progbits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment