clarify the purpose of this project
[nyanglibc.git] / io / openat64.s
blob917240c261f4a3cd8fd6b0d4574458fcb3eee083
1 .text
2 .p2align 4,,15
3 .globl __libc_openat64
4 .type __libc_openat64, @function
5 __libc_openat64:
6 pushq %r12
7 pushq %rbp
8 pushq %rbx
9 subq $96, %rsp
10 testb $64, %dl
11 movq %rcx, 72(%rsp)
12 jne .L2
13 movl %edx, %eax
14 xorl %r10d, %r10d
15 andl $4259840, %eax
16 cmpl $4259840, %eax
17 je .L2
18 .L3:
19 #APP
20 # 45 "../sysdeps/unix/sysv/linux/openat64.c" 1
21 movl %fs:24,%eax
22 # 0 "" 2
23 #NO_APP
24 testl %eax, %eax
25 jne .L6
26 movl $257, %eax
27 #APP
28 # 45 "../sysdeps/unix/sysv/linux/openat64.c" 1
29 syscall
31 # 0 "" 2
32 #NO_APP
33 cmpq $-4096, %rax
34 ja .L14
35 .L1:
36 addq $96, %rsp
37 popq %rbx
38 popq %rbp
39 popq %r12
40 ret
41 .p2align 4,,10
42 .p2align 3
43 .L2:
44 leaq 128(%rsp), %rax
45 movl $24, 24(%rsp)
46 movl 72(%rsp), %r10d
47 movq %rax, 32(%rsp)
48 leaq 48(%rsp), %rax
49 movq %rax, 40(%rsp)
50 jmp .L3
51 .p2align 4,,10
52 .p2align 3
53 .L6:
54 movl %edx, %ebx
55 movq %rsi, %r12
56 movl %edi, %ebp
57 movl %r10d, 12(%rsp)
58 call __libc_enable_asynccancel
59 movl 12(%rsp), %r10d
60 movl %eax, %r8d
61 movl %ebx, %edx
62 movq %r12, %rsi
63 movl %ebp, %edi
64 movl $257, %eax
65 #APP
66 # 45 "../sysdeps/unix/sysv/linux/openat64.c" 1
67 syscall
69 # 0 "" 2
70 #NO_APP
71 cmpq $-4096, %rax
72 ja .L15
73 .L10:
74 movl %r8d, %edi
75 movl %eax, 12(%rsp)
76 call __libc_disable_asynccancel
77 movl 12(%rsp), %eax
78 addq $96, %rsp
79 popq %rbx
80 popq %rbp
81 popq %r12
82 ret
83 .p2align 4,,10
84 .p2align 3
85 .L14:
86 movq __libc_errno@gottpoff(%rip), %rdx
87 negl %eax
88 movl %eax, %fs:(%rdx)
89 movl $-1, %eax
90 jmp .L1
91 .L15:
92 movq __libc_errno@gottpoff(%rip), %rdx
93 negl %eax
94 movl %eax, %fs:(%rdx)
95 movl $-1, %eax
96 jmp .L10
97 .size __libc_openat64, .-__libc_openat64
98 .weak openat
99 .set openat,__libc_openat64
100 .globl __openat
101 .hidden __openat
102 .set __openat,__libc_openat64
103 .weak openat64
104 .set openat64,__libc_openat64
105 .globl __openat64
106 .hidden __openat64
107 .set __openat64,__libc_openat64
108 .hidden __libc_disable_asynccancel
109 .hidden __libc_enable_asynccancel