clarify the purpose of this project
[nyanglibc.git] / stdio-common / remove.shared.s
blob5be188e03af7967db0c77e9949c1666a72ec5134
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __GI_remove
9 .hidden __GI_remove
10 .type __GI_remove, @function
11 __GI_remove:
12 pushq %rbx
13 movq %rdi, %rbx
14 call __unlink
15 testl %eax, %eax
16 je .L1
17 movq __libc_errno@gottpoff(%rip), %rdx
18 movl $-1, %eax
19 cmpl $21, %fs:(%rdx)
20 jne .L1
21 movq %rbx, %rdi
22 call __rmdir
23 testl %eax, %eax
24 setne %al
25 movzbl %al, %eax
26 negl %eax
27 .L1:
28 popq %rbx
29 ret
30 .size __GI_remove, .-__GI_remove
31 .globl remove
32 .set remove,__GI_remove
33 .hidden __rmdir
34 .hidden __unlink