|
楼主 |
发表于 2010-7-24 11:43:27
|
显示全部楼层
汇编代码
">"
main:
20 leal 4(%esp), %ecx
21 andl $-16, %esp
22 pushl -4(%ecx)
23 pushl %ebp
24 movl %esp, %ebp
25 pushl %ecx
26 subl $20, %esp
27 movl $3, -8(%ebp)
28 movl $2, -12(%ebp)
29 movl -8(%ebp), %eax
30 cmpl -12(%ebp), %eax
[color="Red"] 31 jl .L4
32 call ccc
">="
19 main:
20 leal 4(%esp), %ecx
21 andl $-16, %esp
22 pushl -4(%ecx)
23 pushl %ebp
24 movl %esp, %ebp
25 pushl %ecx
26 subl $20, %esp
27 movl $3, -8(%ebp)
28 movl $2, -12(%ebp)
29 movl -8(%ebp), %eax
30 cmpl -12(%ebp), %eax
[color="red"] 31 jle .L4
32 call ccc
.L4部分
汇编代码是相同的
33 .L4:
34 movl $0, %eax
35 addl $20, %esp
36 popl %ecx
37 popl %ebp
38 leal -4(%ecx), %esp
39 ret
都是一条汇编指令
看来">="和 ">"的效率是差不多的 |
|