69,371
社区成员
发帖
与我相关
我的任务
分享
.file "main.cpp"
.section .rodata
.LC0:
.string "ptr1 > ptr2"
.LC1:
.string "ptr2 > ptr1"
.LC2:
.string "ptr1 - ptr2 > 0"
.LC3:
.string "ptr2 - ptr1 > 0"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
movl %esp, %ebp
.cfi_offset 5, -8
.cfi_def_cfa_register 5
andl $-16, %esp
subl $32, %esp
movl $-1, 28(%esp)
movl $0, 24(%esp)
movl 28(%esp), %eax
cmpl 24(%esp), %eax
jbe .L2 //注意这里,
movl $.LC0, (%esp)
call puts
jmp .L3
.L2:
movl $.LC1, (%esp)
call puts
.L3:
movl 28(%esp), %edx
movl 24(%esp), %eax
movl %edx, %ecx
subl %eax, %ecx
movl %ecx, %eax
cmpl $3, %eax
jle .L4 //另一个是这里
movl $.LC2, (%esp)
call puts
jmp .L5
.L4:
movl $.LC3, (%esp)
call puts
.L5:
movl $0, %eax
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585]"
.section .comment.SUSE.OPTs,"MS",@progbits,1
.string "ospwg"
.section .note.GNU-stack,"",@progbits