clarify the purpose of this project
[nyanglibc.git] / libio / fseek.shared.s
blob6fa50fb66b2c7107993536fc0e7e5f482a67ff3e
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_fseek
9 .hidden __GI_fseek
10 .type __GI_fseek, @function
11 __GI_fseek:
12 .LFB68:
13 pushq %r13
14 pushq %r12
15 movl %edx, %r12d
16 pushq %rbp
17 pushq %rbx
18 movq %rsi, %rbp
19 movq %rdi, %rbx
20 subq $8, %rsp
21 movl (%rdi), %edx
22 andl $32768, %edx
23 jne .L2
24 movq 136(%rdi), %rdi
25 movq %fs:16, %r13
26 cmpq %r13, 8(%rdi)
27 je .L3
28 #APP
29 # 35 "fseek.c" 1
30 movl %fs:24,%eax
31 # 0 "" 2
32 #NO_APP
33 testl %eax, %eax
34 jne .L4
35 movl $1, %edx
36 #APP
37 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
38 cmpxchgl %edx, (%rdi)
39 # 0 "" 2
40 #NO_APP
41 .L5:
42 movq 136(%rbx), %rdi
43 movq %r13, 8(%rdi)
44 .L3:
45 addl $1, 4(%rdi)
46 .L2:
47 movl $3, %ecx
48 movl %r12d, %edx
49 movq %rbp, %rsi
50 movq %rbx, %rdi
51 .LEHB0:
52 call _IO_seekoff_unlocked
53 xorl %r8d, %r8d
54 cmpq $-1, %rax
55 sete %r8b
56 negl %r8d
57 testl $32768, (%rbx)
58 jne .L1
59 movq 136(%rbx), %rdi
60 movl 4(%rdi), %eax
61 subl $1, %eax
62 testl %eax, %eax
63 movl %eax, 4(%rdi)
64 jne .L1
65 movq $0, 8(%rdi)
66 #APP
67 # 885 "libioP.h" 1
68 movl %fs:24,%edx
69 # 0 "" 2
70 #NO_APP
71 testl %edx, %edx
72 jne .L11
73 subl $1, (%rdi)
74 .L1:
75 addq $8, %rsp
76 movl %r8d, %eax
77 popq %rbx
78 popq %rbp
79 popq %r12
80 popq %r13
81 ret
82 .p2align 4,,10
83 .p2align 3
84 .L4:
85 movl $1, %ecx
86 movl %edx, %eax
87 lock cmpxchgl %ecx, (%rdi)
88 je .L5
89 call __lll_lock_wait_private
90 .LEHE0:
91 jmp .L5
92 .p2align 4,,10
93 .p2align 3
94 .L11:
95 #APP
96 # 885 "libioP.h" 1
97 xchgl %eax, (%rdi)
98 # 0 "" 2
99 #NO_APP
100 cmpl $1, %eax
101 jle .L1
102 xorl %r10d, %r10d
103 movl $1, %edx
104 movl $129, %esi
105 movl $202, %eax
106 #APP
107 # 885 "libioP.h" 1
108 syscall
110 # 0 "" 2
111 #NO_APP
112 jmp .L1
113 .L15:
114 testl $32768, (%rbx)
115 movq %rax, %r8
116 jne .L13
117 movq 136(%rbx), %rdi
118 movl 4(%rdi), %eax
119 subl $1, %eax
120 testl %eax, %eax
121 movl %eax, 4(%rdi)
122 jne .L13
123 movq $0, 8(%rdi)
124 #APP
125 # 885 "libioP.h" 1
126 movl %fs:24,%edx
127 # 0 "" 2
128 #NO_APP
129 testl %edx, %edx
130 jne .L14
131 subl $1, (%rdi)
132 .L13:
133 movq %r8, %rdi
134 .LEHB1:
135 call _Unwind_Resume@PLT
136 .LEHE1:
137 .L14:
138 #APP
139 # 885 "libioP.h" 1
140 xchgl %eax, (%rdi)
141 # 0 "" 2
142 #NO_APP
143 subl $1, %eax
144 jle .L13
145 xorl %r10d, %r10d
146 movl $1, %edx
147 movl $129, %esi
148 movl $202, %eax
149 #APP
150 # 885 "libioP.h" 1
151 syscall
153 # 0 "" 2
154 #NO_APP
155 jmp .L13
156 .LFE68:
157 .globl __gcc_personality_v0
158 .section .gcc_except_table,"a",@progbits
159 .LLSDA68:
160 .byte 0xff
161 .byte 0xff
162 .byte 0x1
163 .uleb128 .LLSDACSE68-.LLSDACSB68
164 .LLSDACSB68:
165 .uleb128 .LEHB0-.LFB68
166 .uleb128 .LEHE0-.LEHB0
167 .uleb128 .L15-.LFB68
168 .uleb128 0
169 .uleb128 .LEHB1-.LFB68
170 .uleb128 .LEHE1-.LEHB1
171 .uleb128 0
172 .uleb128 0
173 .LLSDACSE68:
174 .text
175 .size __GI_fseek, .-__GI_fseek
176 .globl fseek
177 .set fseek,__GI_fseek
178 .hidden DW.ref.__gcc_personality_v0
179 .weak DW.ref.__gcc_personality_v0
180 .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat
181 .align 8
182 .type DW.ref.__gcc_personality_v0, @object
183 .size DW.ref.__gcc_personality_v0, 8
184 DW.ref.__gcc_personality_v0:
185 .quad __gcc_personality_v0
186 .hidden __lll_lock_wait_private
187 .hidden _IO_seekoff_unlocked