Created
August 31, 2012 03:14
-
-
Save mbohun/3548525 to your computer and use it in GitHub Desktop.
gcc sse/sse2 fpu x387 'gcc -msse2 -mfpmath=sse'
This file contains hidden or 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
; gcc sse/sse2 fpu x387 'gcc -msse2 -mfpmath=sse' | |
; | |
; bash-3.1$ gcc -fomit-frame-pointer -msse2 -mfpmath=sse -S test_c_asm-float-or-mmx.c | |
; bash-3.1$ cat test_c_asm-float-or-mmx.s | |
.file "test_c_asm-float-or-mmx.c" | |
.text | |
.globl test | |
.type test, @function | |
test: | |
subl $4, %esp | |
movss 8(%esp), %xmm0 | |
addss %xmm0, %xmm0 | |
movss %xmm0, (%esp) | |
flds (%esp) | |
addl $4, %esp | |
ret | |
.size test, .-test | |
.ident "GCC: (GNU) 4.4.2" | |
.section .note.GNU-stack,"",@progbits | |
; bash-3.1$ gcc -fomit-frame-pointer -msse2 -S test_c_asm-float-or-mmx.c | |
; bash-3.1$ cat test_c_asm-float-or-mmx.s | |
.file "test_c_asm-float-or-mmx.c" | |
.text | |
.globl test | |
.type test, @function | |
test: | |
flds 4(%esp) | |
fadd %st(0), %st | |
ret | |
.size test, .-test | |
.ident "GCC: (GNU) 4.4.2" | |
.section .note.GNU-stack,"",@progbits | |
; martin@yobbo:~/src$ cat test_c_asm-float-or-mmx.c | |
; float test(float f) | |
; { | |
; return f * 2.0f; | |
; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment