clarify the purpose of this project
[nyanglibc.git] / io / fcntl64.shared.s
blob68d11e39278d6bfd443ae80aab94490d6f42c57c
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___libc_fcntl64
9 .hidden __GI___libc_fcntl64
10 .type __GI___libc_fcntl64, @function
11 __GI___libc_fcntl64:
12 subq $104, %rsp
13 cmpl $7, %esi
14 leaq 112(%rsp), %rax
15 movq %rdx, 64(%rsp)
16 movl $16, 24(%rsp)
17 movq %rax, 32(%rsp)
18 leaq 48(%rsp), %rax
19 movq %rax, 40(%rsp)
20 je .L12
21 cmpl $38, %esi
22 jne .L4
23 .L12:
24 #APP
25 # 49 "../sysdeps/unix/sysv/linux/fcntl64.c" 1
26 movl %fs:24,%eax
27 # 0 "" 2
28 #NO_APP
29 testl %eax, %eax
30 jne .L6
31 movl $72, %eax
32 #APP
33 # 49 "../sysdeps/unix/sysv/linux/fcntl64.c" 1
34 syscall
36 # 0 "" 2
37 #NO_APP
38 cmpq $-4096, %rax
39 ja .L15
40 .L1:
41 addq $104, %rsp
42 ret
43 .p2align 4,,10
44 .p2align 3
45 .L4:
46 call __fcntl64_nocancel_adjusted
47 addq $104, %rsp
48 ret
49 .p2align 4,,10
50 .p2align 3
51 .L6:
52 movl %esi, 12(%rsp)
53 movl %edi, 8(%rsp)
54 movq %rdx, (%rsp)
55 call __libc_enable_asynccancel
56 movq (%rsp), %rdx
57 movl %eax, %r8d
58 movl 12(%rsp), %esi
59 movl 8(%rsp), %edi
60 movl $72, %eax
61 #APP
62 # 49 "../sysdeps/unix/sysv/linux/fcntl64.c" 1
63 syscall
65 # 0 "" 2
66 #NO_APP
67 cmpq $-4096, %rax
68 ja .L16
69 .L10:
70 movl %r8d, %edi
71 movl %eax, (%rsp)
72 call __libc_disable_asynccancel
73 movl (%rsp), %eax
74 jmp .L1
75 .p2align 4,,10
76 .p2align 3
77 .L15:
78 movq __libc_errno@gottpoff(%rip), %rdx
79 negl %eax
80 movl %eax, %fs:(%rdx)
81 movl $-1, %eax
82 jmp .L1
83 .L16:
84 movq __libc_errno@gottpoff(%rip), %rdx
85 negl %eax
86 movl %eax, %fs:(%rdx)
87 movl $-1, %eax
88 jmp .L10
89 .size __GI___libc_fcntl64, .-__GI___libc_fcntl64
90 .globl __libc_fcntl64
91 .set __libc_fcntl64,__GI___libc_fcntl64
92 .weak fcntl
93 .set fcntl,__libc_fcntl64
94 .weak __GI___fcntl
95 .set __GI___fcntl,__libc_fcntl64
96 .weak __fcntl
97 .set __fcntl,__libc_fcntl64
98 .weak __GI___libc_fcntl
99 .hidden __GI___libc_fcntl
100 .set __GI___libc_fcntl,__libc_fcntl64
101 .weak fcntl64
102 .set fcntl64,__libc_fcntl64
103 .weak __GI___fcntl64
104 .hidden __GI___fcntl64
105 .set __GI___fcntl64,__libc_fcntl64
106 .weak __fcntl64
107 .set __fcntl64,__GI___fcntl64
108 .hidden __libc_disable_asynccancel
109 .hidden __libc_enable_asynccancel
110 .hidden __fcntl64_nocancel_adjusted