repo.or.cz
/
nyanglibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
clarify the purpose of this project
[nyanglibc.git]
/
libio
/
clearerr.s
blob
afd63cc045c1c8ab3ca711ad20d22dc844e13bc0
1
.text
2
.p2align 4,,15
3
.globl clearerr
4
.type clearerr, @function
5
clearerr
:
6
movl
(%
rdi
), %
edx
7
movl
%
edx
, %
esi
8
andl $
32768
, %
esi
9
jne
.L2
10
pushq
%
rbp
11
pushq
%
rbx
12
subq $
8
, %
rsp
13
movq
136
(%
rdi
), %
rcx
14
movq
%
fs
:
16
, %
rbp
15
cmpq
%
rbp
,
8
(%
rcx
)
16
je
.L3
17
movq
%
rdi
, %
rbx
18
#APP
19
# 25 "clearerr.c" 1
20
movl
%
fs
:
24
,%
eax
21
# 0 "" 2
22
#NO_APP
23
testl
%
eax
, %
eax
24
movl $
1
, %
edx
25
jne
.L4
26
#APP
27
# 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
28
cmpxchgl
%
edx
, (%
rcx
)
29
# 0 "" 2
30
#NO_APP
31
.L5:
32
movq
136
(%
rbx
), %
rcx
33
movl
(%
rbx
), %
edx
34
movl
4
(%
rcx
), %
eax
35
movq
%
rbp
,
8
(%
rcx
)
36
leal
1
(%
rax
), %
esi
37
movl
%
esi
,
4
(%
rcx
)
38
movl
%
edx
, %
esi
39
andl $
-
49
, %
esi
40
andb $
-
128
, %
dh
41
movl
%
esi
, (%
rbx
)
42
jne
.L1
43
.L6:
44
testl
%
eax
, %
eax
45
movl
%
eax
,
4
(%
rcx
)
46
jne
.L1
47
movq $
0
,
8
(%
rcx
)
48
#APP
49
# 27 "clearerr.c" 1
50
movl
%
fs
:
24
,%
edx
51
# 0 "" 2
52
#NO_APP
53
testl
%
edx
, %
edx
54
jne
.L9
55
subl $
1
, (%
rcx
)
56
.L1:
57
addq $
8
, %
rsp
58
popq
%
rbx
59
popq
%
rbp
60
ret
61
.p2align 4,,10
62
.p2align 3
63
.L2:
64
andl $
-
49
, %
edx
65
movl
%
edx
, (%
rdi
)
66
ret
67
.p2align 4,,10
68
.p2align 3
69
.L3:
70
movl
4
(%
rcx
), %
eax
71
andl $
-
49
, %
edx
72
leal
1
(%
rax
), %
esi
73
movl
%
esi
,
4
(%
rcx
)
74
movl
%
edx
, (%
rdi
)
75
jmp
.L6
76
.p2align 4,,10
77
.p2align 3
78
.L4:
79
movl
%
esi
, %
eax
80
lock cmpxchgl
%
edx
, (%
rcx
)
81
je
.L5
82
movq
%
rcx
, %
rdi
83
call __lll_lock_wait_private
84
jmp
.L5
85
.p2align 4,,10
86
.p2align 3
87
.L9:
88
#APP
89
# 27 "clearerr.c" 1
90
xchgl
%
eax
, (%
rcx
)
91
# 0 "" 2
92
#NO_APP
93
cmpl
$
1
, %
eax
94
jle
.L1
95
xorl
%
r10d
, %
r10d
96
movl $
1
, %
edx
97
movl $
129
, %
esi
98
movq
%
rcx
, %
rdi
99
movl $
202
, %
eax
100
#APP
101
# 27 "clearerr.c" 1
102
syscall
103
104
# 0 "" 2
105
#NO_APP
106
jmp
.L1
107
.size clearerr, .-clearerr
108
.hidden __lll_lock_wait_private