clarify the purpose of this project
[nyanglibc.git] / stdlib / wctomb.shared.s
blob57695981683260f59c580ec1878fb8458c333f19
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_wctomb
9 .hidden __GI_wctomb
10 .type __GI_wctomb, @function
11 __GI_wctomb:
12 testq %rdi, %rdi
13 pushq %rbx
14 je .L9
15 leaq __wctomb_state(%rip), %rdx
16 call __wcrtomb
17 popq %rbx
18 ret
19 .p2align 4,,10
20 .p2align 3
21 .L9:
22 movq __libc_tsd_LOCALE@gottpoff(%rip), %rax
23 movq %fs:(%rax), %rax
24 movq (%rax), %rbx
25 movq 40(%rbx), %rax
26 testq %rax, %rax
27 je .L10
28 .L4:
29 movq 16(%rax), %rax
30 movq $0, __wctomb_state(%rip)
31 popq %rbx
32 movl 88(%rax), %eax
33 ret
34 .p2align 4,,10
35 .p2align 3
36 .L10:
37 leaq _nl_C_LC_CTYPE(%rip), %rax
38 cmpq %rax, %rbx
39 je .L6
40 movq %rbx, %rdi
41 call __wcsmbs_load_conv
42 movq 40(%rbx), %rax
43 jmp .L4
44 .L6:
45 leaq __wcsmbs_gconv_fcts_c(%rip), %rax
46 jmp .L4
47 .size __GI_wctomb, .-__GI_wctomb
48 .globl wctomb
49 .set wctomb,__GI_wctomb
50 .hidden __wctomb_state
51 .comm __wctomb_state,8,8
52 .hidden __wcsmbs_gconv_fcts_c
53 .hidden __wcsmbs_load_conv
54 .hidden _nl_C_LC_CTYPE
55 .hidden __wcrtomb