On Tue, Jan 27, 2015 at 02:13:38PM +0100, Denys Vlasenko wrote:
> With gcc 4.7.2:
>
> call udhcp_sp_fd_set #
> cmpl $0, bb_common_bufsiz1+52(%rip) #, MEM[(struct
> server_config_t * {ref-all})&bb_common_bufsiz1].auto_time
> movl %eax, %ebx #, max_sock
> je .L71 #,
> call monotonic_sec #
> movl 24(%rsp), %edx # %sfp,
> movq $0, 56(%rsp) #, tv.tv_usec
> subl %eax, %edx # D.8343,
> movl %edx, %eax #,
> movq %rax, 48(%rsp) #, tv.tv_sec
> .L71:
> xorl %r8d, %r8d # iftmp.11
> cmpl $0, bb_common_bufsiz1+52(%rip) #, MEM[(struct
> server_config_t * {ref-all})&bb_common_bufsiz1].auto_time
> je .L72 #,
> cmpq $0, 48(%rsp) #, tv.tv_sec
> jg .L110 #,
> jmp .L166 #
> .L110:
> leaq 48(%rsp), %r8 #, iftmp.11
> .L72:
> leal 1(%rbx), %edi #, tmp216
> leaq 104(%rsp), %rsi #,
> xorl %ecx, %ecx #
> xorl %edx, %edx #
> call select #
Interesting. I've sent an updated patch based on Rich's suggestion, and
I examined the generated assembly after applying it as well. GCC
emits the expected instruction in that case as well:
.L88:
movl 52+bb_common_bufsiz1(%rip), %r14d # MEM[(struct
server_config_t * {ref-all})&bb_common_bufsiz1].auto_time,
testl %r14d, %r14d #
je .L89 #,
cmpq $0, 80(%rsp) #, tv.tv_sec
jle .L180 #,
leaq 80(%rsp), %r8 #, iftmp.12
jmp .L87 #
I'm at a loss as to why this behavior occurs. I've got gcc-4.7.4 and
gcc 4.9.7 and 4.9.2 building. I'll try to reproduce it with those with
the problem code, and see what I get, just for the hell of it.
Tim
pgpR8GA64fWeO.pgp
Description: PGP signature
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
