Skip to content

Instantly share code, notes, and snippets.

@y-tag
Created March 12, 2013 21:41
Show Gist options
  • Save y-tag/5147336 to your computer and use it in GitHub Desktop.
Save y-tag/5147336 to your computer and use it in GitHub Desktop.
$ g++ -o mixed_entropy.64.O2.s -S mixed_entropy.cc -Wall -O2
.file "mixed_entropy.cc"
.text
.p2align 4,,15
.globl _Z13mixed_entropydd
.type _Z13mixed_entropydd, @function
_Z13mixed_entropydd:
.LFB123:
.cfi_startproc
movapd %xmm0, %xmm2
subq $40, %rsp
.cfi_def_cfa_offset 48
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jp .L5
jne .L5
addq $40, %rsp
.cfi_remember_state
.cfi_def_cfa_offset 8
ret
.p2align 4,,10
.p2align 3
.L5:
.cfi_restore_state
movapd %xmm1, %xmm0
movsd %xmm1, (%rsp)
movsd %xmm2, 16(%rsp)
call log
movsd (%rsp), %xmm1
movsd 16(%rsp), %xmm2
addq $40, %rsp
.cfi_def_cfa_offset 8
divsd %xmm1, %xmm2
subsd %xmm2, %xmm0
ret
.cfi_endproc
.LFE123:
.size _Z13mixed_entropydd, .-_Z13mixed_entropydd
.section .rodata.str1.1,"aMS",@progbits,1
.LC1:
.string "d = %g\n"
.section .text.startup,"ax",@progbits
.p2align 4,,15
.globl main
.type main, @function
main:
.LFB124:
.cfi_startproc
subq $8, %rsp
.cfi_def_cfa_offset 16
xorpd %xmm0, %xmm0
movq stdout(%rip), %rdi
movl $.LC1, %edx
movl $1, %esi
movl $1, %eax
call __fprintf_chk
movq stdout(%rip), %rdi
xorpd %xmm0, %xmm0
movl $.LC1, %edx
movl $1, %esi
movl $1, %eax
call __fprintf_chk
movsd .LC2(%rip), %xmm1
movsd .LC3(%rip), %xmm0
call _Z13mixed_entropydd
movq stdout(%rip), %rdi
movl $.LC1, %edx
movl $1, %esi
movl $1, %eax
call __fprintf_chk
xorl %eax, %eax
addq $8, %rsp
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE124:
.size main, .-main
.section .rodata.cst8,"aM",@progbits,8
.align 8
.LC2:
.long 0
.long 1074266112
.align 8
.LC3:
.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