clarify the purpose of this project
[nyanglibc.git] / sunrpc / create_xid.shared.s
blob59fb4628775b220fbe47e16e56e56ae1c6869300
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 _create_xid
9 .type _create_xid, @function
10 _create_xid:
11 pushq %rbp
12 pushq %rbx
13 subq $24, %rsp
14 #APP
15 # 37 "create_xid.c" 1
16 movl %fs:24,%eax
17 # 0 "" 2
18 #NO_APP
19 testl %eax, %eax
20 jne .L2
21 movl $1, %edx
22 #APP
23 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
24 cmpxchgl %edx, createxid_lock(%rip)
25 # 0 "" 2
26 #NO_APP
27 .L3:
28 call __GI_getpid
29 cmpl %eax, is_initialized(%rip)
30 movl %eax, %ebx
31 movq %rsp, %rbp
32 je .L4
33 movq %rbp, %rsi
34 xorl %edi, %edi
35 call __GI___clock_gettime
36 movq (%rsp), %rdi
37 xorq 8(%rsp), %rdi
38 movslq %ebx, %rax
39 leaq __rpc_lrand48_data(%rip), %rsi
40 xorq %rax, %rdi
41 call __srand48_r
42 movl %ebx, is_initialized(%rip)
43 .L4:
44 leaq __rpc_lrand48_data(%rip), %rdi
45 movq %rbp, %rsi
46 call __GI_lrand48_r
47 #APP
48 # 52 "create_xid.c" 1
49 movl %fs:24,%eax
50 # 0 "" 2
51 #NO_APP
52 testl %eax, %eax
53 jne .L5
54 subl $1, createxid_lock(%rip)
55 .L6:
56 movq (%rsp), %rax
57 addq $24, %rsp
58 popq %rbx
59 popq %rbp
60 ret
61 .p2align 4,,10
62 .p2align 3
63 .L2:
64 xorl %eax, %eax
65 movl $1, %edx
66 lock cmpxchgl %edx, createxid_lock(%rip)
67 je .L3
68 leaq createxid_lock(%rip), %rdi
69 call __lll_lock_wait_private
70 jmp .L3
71 .p2align 4,,10
72 .p2align 3
73 .L5:
74 xorl %eax, %eax
75 #APP
76 # 52 "create_xid.c" 1
77 xchgl %eax, createxid_lock(%rip)
78 # 0 "" 2
79 #NO_APP
80 cmpl $1, %eax
81 jle .L6
82 xorl %r10d, %r10d
83 movl $1, %edx
84 movl $129, %esi
85 leaq createxid_lock(%rip), %rdi
86 movl $202, %eax
87 #APP
88 # 52 "create_xid.c" 1
89 syscall
91 # 0 "" 2
92 #NO_APP
93 jmp .L6
94 .size _create_xid, .-_create_xid
95 .local __rpc_lrand48_data
96 .comm __rpc_lrand48_data,24,16
97 .local is_initialized
98 .comm is_initialized,4,4
99 .local createxid_lock
100 .comm createxid_lock,4,4
101 .hidden __lll_lock_wait_private
102 .hidden __srand48_r