clarify the purpose of this project
[nyanglibc.git] / stdio-common / reg-type.shared.s
blob123cf3fde60d2964ed48d3419eddf5493723d05c
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .section __libc_freeres_ptrs, "aw", %nobits
7 .previous
8 #NO_APP
9 .p2align 4,,15
10 .globl __register_printf_type
11 .type __register_printf_type, @function
12 __register_printf_type:
13 pushq %rbx
14 movq %rdi, %rbx
15 #APP
16 # 38 "reg-type.c" 1
17 movl %fs:24,%eax
18 # 0 "" 2
19 #NO_APP
20 testl %eax, %eax
21 jne .L2
22 movl $1, %edx
23 #APP
24 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
25 cmpxchgl %edx, lock(%rip)
26 # 0 "" 2
27 #NO_APP
28 .L3:
29 cmpq $0, __printf_va_arg_table(%rip)
30 je .L4
31 .L8:
32 movl pa_next_type(%rip), %r8d
33 cmpl $256, %r8d
34 je .L15
35 leal 1(%r8), %eax
36 movq __printf_va_arg_table(%rip), %rdx
37 movl %eax, pa_next_type(%rip)
38 movslq %r8d, %rax
39 movq %rbx, -64(%rdx,%rax,8)
40 .L7:
41 #APP
42 # 57 "reg-type.c" 1
43 movl %fs:24,%eax
44 # 0 "" 2
45 #NO_APP
46 testl %eax, %eax
47 jne .L9
48 subl $1, lock(%rip)
49 .L1:
50 movl %r8d, %eax
51 popq %rbx
52 ret
53 .p2align 4,,10
54 .p2align 3
55 .L4:
56 movl $8, %esi
57 movl $248, %edi
58 call calloc@PLT
59 testq %rax, %rax
60 movq %rax, __printf_va_arg_table(%rip)
61 jne .L8
62 movl $-1, %r8d
63 jmp .L7
64 .p2align 4,,10
65 .p2align 3
66 .L9:
67 xorl %eax, %eax
68 #APP
69 # 57 "reg-type.c" 1
70 xchgl %eax, lock(%rip)
71 # 0 "" 2
72 #NO_APP
73 cmpl $1, %eax
74 jle .L1
75 xorl %r10d, %r10d
76 movl $1, %edx
77 movl $129, %esi
78 leaq lock(%rip), %rdi
79 movl $202, %eax
80 #APP
81 # 57 "reg-type.c" 1
82 syscall
84 # 0 "" 2
85 #NO_APP
86 jmp .L1
87 .p2align 4,,10
88 .p2align 3
89 .L2:
90 xorl %eax, %eax
91 movl $1, %edx
92 lock cmpxchgl %edx, lock(%rip)
93 je .L3
94 leaq lock(%rip), %rdi
95 call __lll_lock_wait_private
96 jmp .L3
97 .p2align 4,,10
98 .p2align 3
99 .L15:
100 movq __libc_errno@gottpoff(%rip), %rax
101 movl $-1, %r8d
102 movl $28, %fs:(%rax)
103 jmp .L7
104 .size __register_printf_type, .-__register_printf_type
105 .weak register_printf_type
106 .set register_printf_type,__register_printf_type
107 .data
108 .align 4
109 .type pa_next_type, @object
110 .size pa_next_type, 4
111 pa_next_type:
112 .long 8
113 .local lock
114 .comm lock,4,4
115 .hidden __printf_va_arg_table
116 .globl __printf_va_arg_table
117 .section __libc_freeres_ptrs
118 #,"aw",@progbits
119 .align 8
120 .type __printf_va_arg_table, @object
121 .size __printf_va_arg_table, 8
122 __printf_va_arg_table:
123 .zero 8
124 .hidden __lll_lock_wait_private