21,458
社区成员
发帖
与我相关
我的任务
分享
.section .data
output1: .ascii "not "
output2: .asciz "support sse42\n"
.equ len1 , .-output1
.equ len2 , .-output2
.equ FEATURE , 0x100000
.section .text
.globl _start
_start:
pushl %ebp
movl %esp , %ebp
movl $1 , %eax
cpuid
test FEATURE , %ecx
movl $output2 , %eax
jnz _write
movl $output1 , %eax
_write:
pushl %eax
#call printf
# 在mingw里 , printf 换为 _printf
call _printf
movl %ebp , %esp
popl %ebp
ret
warning: `C:\Windows\SYSTEM32\ntdll.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `C:\Windows\SYSTEM32\wow64.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `C:\Windows\SYSTEM32\wow64win.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: `C:\Windows\SYSTEM32\wow64cpu.dll': Shared library architecture i386:x86-64 is not compatible with target architecture i386.
warning: Could not load shared library symbols for WOW64_IMAGE_SECTION.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for WOW64_IMAGE_SECTION.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for NOT_AN_IMAGE.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for NOT_AN_IMAGE.
Do you need "set solib-search-path" or "set sysroot"?
gdb: unknown target exception 0x4000001f at 0x401000