Created
February 14, 2018 14:35
-
-
Save blubberdiblub/2e1424a1c59ca4baaf1dcaa9ae932fda to your computer and use it in GitHub Desktop.
((struct dirent *)d)->d_name handling in a boolean context
This file contains 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
# foobar.c:13: result = (d && d->d_name); | |
cmpq $0, -24(%rbp) #, d | |
je .L2 #, | |
# foobar.c:13: result = (d && d->d_name); | |
movq -24(%rbp), %rax # d, tmp91 | |
addq $19, %rax #, _1 | |
testq %rax, %rax # _1 | |
je .L2 #, | |
# foobar.c:13: result = (d && d->d_name); | |
movl $1, %eax #, iftmp.0_2 | |
jmp .L3 # | |
.L2: | |
# foobar.c:13: result = (d && d->d_name); | |
movl $0, %eax #, iftmp.0_2 | |
.L3: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment