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