Created
March 12, 2013 21:44
-
-
Save y-tag/5147362 to your computer and use it in GitHub Desktop.
$ g++ -o mixed_entropy.32.s -S mixed_entropy.cc -Wall -m32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.file "mixed_entropy.cc" | |
.text | |
.globl _Z13mixed_entropydd | |
.type _Z13mixed_entropydd, @function | |
_Z13mixed_entropydd: | |
.LFB85: | |
.cfi_startproc | |
pushl %ebp | |
.cfi_def_cfa_offset 8 | |
.cfi_offset 5, -8 | |
movl %esp, %ebp | |
.cfi_def_cfa_register 5 | |
subl $40, %esp | |
movl 8(%ebp), %eax | |
movl %eax, -16(%ebp) | |
movl 12(%ebp), %eax | |
movl %eax, -12(%ebp) | |
movl 16(%ebp), %eax | |
movl %eax, -24(%ebp) | |
movl 20(%ebp), %eax | |
movl %eax, -20(%ebp) | |
fldl -24(%ebp) | |
fldz | |
fucomip %st(1), %st | |
fstp %st(0) | |
jp .L2 | |
fldl -24(%ebp) | |
fldz | |
fucomip %st(1), %st | |
fstp %st(0) | |
jne .L2 | |
.L5: | |
fldz | |
jmp .L4 | |
.L2: | |
fldl -24(%ebp) | |
fstpl (%esp) | |
call log | |
fldl -16(%ebp) | |
fdivl -24(%ebp) | |
fsubrp %st, %st(1) | |
.L4: | |
leave | |
.cfi_restore 5 | |
.cfi_def_cfa 4, 4 | |
ret | |
.cfi_endproc | |
.LFE85: | |
.size _Z13mixed_entropydd, .-_Z13mixed_entropydd | |
.section .rodata | |
.LC3: | |
.string "d = %g\n" | |
.text | |
.globl main | |
.type main, @function | |
main: | |
.LFB86: | |
.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 $64, %esp | |
fldl .LC2 | |
fstpl 32(%esp) | |
movl $3, (%esp) | |
call _ZSt3logIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_ | |
fldl .LC2 | |
fmulp %st, %st(1) | |
fstpl 40(%esp) | |
fldl 40(%esp) | |
fchs | |
fldl .LC2 | |
fdivrp %st, %st(1) | |
fstpl 24(%esp) | |
movl $3, (%esp) | |
call _ZSt3logIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_ | |
faddl 24(%esp) | |
fstpl 48(%esp) | |
fldz | |
fstpl 56(%esp) | |
fldl 48(%esp) | |
fstpl 56(%esp) | |
movl stdout, %eax | |
fldl 56(%esp) | |
fstpl 8(%esp) | |
movl $.LC3, 4(%esp) | |
movl %eax, (%esp) | |
call fprintf | |
fldl 32(%esp) | |
fldz | |
fucomip %st(1), %st | |
fstp %st(0) | |
jp .L7 | |
fldl 32(%esp) | |
fldz | |
fucomip %st(1), %st | |
fstp %st(0) | |
jne .L7 | |
.L10: | |
fldz | |
jmp .L9 | |
.L7: | |
fldl 32(%esp) | |
fstpl (%esp) | |
call log | |
fldl 40(%esp) | |
fdivl 32(%esp) | |
fsubrp %st, %st(1) | |
.L9: | |
fstpl 56(%esp) | |
movl stdout, %eax | |
fldl 56(%esp) | |
fstpl 8(%esp) | |
movl $.LC3, 4(%esp) | |
movl %eax, (%esp) | |
call fprintf | |
fldl 32(%esp) | |
fstpl 8(%esp) | |
fldl 40(%esp) | |
fstpl (%esp) | |
call _Z13mixed_entropydd | |
fstpl 56(%esp) | |
movl stdout, %eax | |
fldl 56(%esp) | |
fstpl 8(%esp) | |
movl $.LC3, 4(%esp) | |
movl %eax, (%esp) | |
call fprintf | |
movl $0, %eax | |
leave | |
.cfi_restore 5 | |
.cfi_def_cfa 4, 4 | |
ret | |
.cfi_endproc | |
.LFE86: | |
.size main, .-main | |
.section .text._ZSt3logIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_,"axG",@progbits,_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_,comdat | |
.weak _ZSt3logIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_ | |
.type _ZSt3logIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_, @function | |
_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_: | |
.LFB87: | |
.cfi_startproc | |
pushl %ebp | |
.cfi_def_cfa_offset 8 | |
.cfi_offset 5, -8 | |
movl %esp, %ebp | |
.cfi_def_cfa_register 5 | |
subl $24, %esp | |
fildl 8(%ebp) | |
fstpl (%esp) | |
call log | |
leave | |
.cfi_restore 5 | |
.cfi_def_cfa 4, 4 | |
ret | |
.cfi_endproc | |
.LFE87: | |
.size _ZSt3logIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_, .-_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsrSt12__is_integerIT_E7__valueEdE6__typeES3_ | |
.section .rodata | |
.align 8 | |
.LC2: | |
.long 0 | |
.long 1074266112 | |
.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