Skip to content

Instantly share code, notes, and snippets.

@y-tag
Last active December 14, 2015 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save y-tag/5147366 to your computer and use it in GitHub Desktop.
Save y-tag/5147366 to your computer and use it in GitHub Desktop.
$ g++ -o mixed_entropy.32.O2.s -S mixed_entropy.cc -Wall -m32 -O2
.file "mixed_entropy.cc"
.text
.p2align 4,,15
.globl _Z13mixed_entropydd
.type _Z13mixed_entropydd, @function
_Z13mixed_entropydd:
.LFB119:
.cfi_startproc
subl $60, %esp
.cfi_def_cfa_offset 64
fldl 64(%esp)
fldl 72(%esp)
fldz
fld %st(0)
fxch %st(2)
fucomi %st(2), %st
fstp %st(2)
jp .L7
jne .L8
fstp %st(1)
fstp %st(1)
addl $60, %esp
.cfi_remember_state
.cfi_def_cfa_offset 4
ret
.p2align 4,,7
.p2align 3
.L7:
.cfi_restore_state
fstp %st(0)
jmp .L5
.p2align 4,,7
.p2align 3
.L8:
fstp %st(0)
.L5:
fstl (%esp)
fstpl 16(%esp)
fstpl 32(%esp)
call log
fldl 16(%esp)
fldl 32(%esp)
addl $60, %esp
.cfi_def_cfa_offset 4
fdivp %st, %st(1)
fsubrp %st, %st(1)
ret
.cfi_endproc
.LFE119:
.size _Z13mixed_entropydd, .-_Z13mixed_entropydd
.section .rodata.str1.1,"aMS",@progbits,1
.LC2:
.string "d = %g\n"
.section .text.startup,"ax",@progbits
.p2align 4,,15
.globl main
.type main, @function
main:
.LFB120:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
andl $-16, %esp
subl $48, %esp
movl stdout, %eax
fldz
fstl 12(%esp)
movl $.LC2, 8(%esp)
fstps 32(%esp)
movl $1, 4(%esp)
movl %eax, (%esp)
call __fprintf_chk
movl stdout, %eax
movl $.LC2, 8(%esp)
movl $1, 4(%esp)
movl %eax, (%esp)
flds 32(%esp)
fstpl 12(%esp)
call __fprintf_chk
flds .LC3
fstpl 8(%esp)
fldl .LC4
fstpl (%esp)
call _Z13mixed_entropydd
movl stdout, %eax
movl $.LC2, 8(%esp)
movl $1, 4(%esp)
movl %eax, (%esp)
fstpl 12(%esp)
call __fprintf_chk
xorl %eax, %eax
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
.LFE120:
.size main, .-main
.section .rodata.cst4,"aM",@progbits,4
.align 4
.LC3:
.long 1077936128
.section .rodata.cst8,"aM",@progbits,8
.align 8
.LC4:
.long 3087238288
.long 1074421215
.ident "GCC: (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3"
.section .note.GNU-stack,"",@progbits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment