clarify the purpose of this project
[nyanglibc.git] / io / open64.shared.s
blobf3fa4f0b22f2270a61535df3189f1456650b1bf8
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 __libc_open64
9 .type __libc_open64, @function
10 __libc_open64:
11 pushq %rbp
12 pushq %rbx
13 movl %esi, %r10d
14 subq $104, %rsp
15 andl $64, %r10d
16 movq %rdx, 64(%rsp)
17 jne .L2
18 movl %esi, %eax
19 andl $4259840, %eax
20 cmpl $4259840, %eax
21 je .L2
22 .L3:
23 #APP
24 # 48 "../sysdeps/unix/sysv/linux/open64.c" 1
25 movl %fs:24,%eax
26 # 0 "" 2
27 #NO_APP
28 testl %eax, %eax
29 jne .L6
30 movl %esi, %edx
31 movl $257, %eax
32 movq %rdi, %rsi
33 movl $-100, %edi
34 #APP
35 # 48 "../sysdeps/unix/sysv/linux/open64.c" 1
36 syscall
38 # 0 "" 2
39 #NO_APP
40 cmpq $-4096, %rax
41 ja .L13
42 .L1:
43 addq $104, %rsp
44 popq %rbx
45 popq %rbp
46 ret
47 .p2align 4,,10
48 .p2align 3
49 .L2:
50 leaq 128(%rsp), %rax
51 movl $16, 24(%rsp)
52 movl 64(%rsp), %r10d
53 movq %rax, 32(%rsp)
54 leaq 48(%rsp), %rax
55 movq %rax, 40(%rsp)
56 jmp .L3
57 .p2align 4,,10
58 .p2align 3
59 .L6:
60 movl %esi, %ebx
61 movq %rdi, %rbp
62 movl %r10d, 12(%rsp)
63 call __libc_enable_asynccancel
64 movl 12(%rsp), %r10d
65 movl %eax, %r8d
66 movl %ebx, %edx
67 movq %rbp, %rsi
68 movl $-100, %edi
69 movl $257, %eax
70 #APP
71 # 48 "../sysdeps/unix/sysv/linux/open64.c" 1
72 syscall
74 # 0 "" 2
75 #NO_APP
76 cmpq $-4096, %rax
77 ja .L14
78 .L10:
79 movl %r8d, %edi
80 movl %eax, 12(%rsp)
81 call __libc_disable_asynccancel
82 movl 12(%rsp), %eax
83 addq $104, %rsp
84 popq %rbx
85 popq %rbp
86 ret
87 .p2align 4,,10
88 .p2align 3
89 .L13:
90 movq __libc_errno@gottpoff(%rip), %rdx
91 negl %eax
92 movl %eax, %fs:(%rdx)
93 movl $-1, %eax
94 jmp .L1
95 .L14:
96 movq __libc_errno@gottpoff(%rip), %rdx
97 negl %eax
98 movl %eax, %fs:(%rdx)
99 movl $-1, %eax
100 jmp .L10
101 .size __libc_open64, .-__libc_open64
102 .weak open
103 .set open,__libc_open64
104 .globl __GI___open
105 .hidden __GI___open
106 .set __GI___open,__libc_open64
107 .weak __open
108 .set __open,__GI___open
109 .globl __GI___libc_open
110 .hidden __GI___libc_open
111 .set __GI___libc_open,__libc_open64
112 .weak open64
113 .set open64,__libc_open64
114 .globl __GI___open64
115 .hidden __GI___open64
116 .set __GI___open64,__libc_open64
117 .weak __open64
118 .set __open64,__GI___open64
119 .hidden __libc_disable_asynccancel
120 .hidden __libc_enable_asynccancel