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]
/
stdlib
/
rand_r.shared.s
blob
dd907c39ce8544480e57706967b8a09ddd5b8f7a
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 rand_r
9
.type rand_r, @function
10
rand_r
:
11
imull $
1103515245
, (%
rdi
), %
eax
12
addl $
12345
, %
eax
13
imull $
1103515245
, %
eax
, %
edx
14
shrl $
6
, %
eax
15
andl $
2096128
, %
eax
16
addl $
12345
, %
edx
17
movl
%
edx
, %
ecx
18
imull $
1103515245
, %
edx
, %
edx
19
shrl $
16
, %
ecx
20
andl $
1023
, %
ecx
21
orl
%
ecx
, %
eax
22
addl $
12345
, %
edx
23
sall $
10
, %
eax
24
movl
%
edx
, %
ecx
25
movl
%
edx
, (%
rdi
)
26
shrl $
16
, %
ecx
27
andl $
1023
, %
ecx
28
xorl
%
ecx
, %
eax
29
ret
30
.size rand_r, .-rand_r