clarify the purpose of this project
[nyanglibc.git] / nptl / connect.s
bloba6b96bbfbe792eec47893f53efbea4d849a71b02
1 .text
2 .p2align 4,,15
3 .globl __libc_connect
4 .type __libc_connect, @function
5 __libc_connect:
6 #APP
7 # 26 "../sysdeps/unix/sysv/linux/connect.c" 1
8 movl %fs:24,%eax
9 # 0 "" 2
10 #NO_APP
11 testl %eax, %eax
12 jne .L2
13 movl $42, %eax
14 #APP
15 # 26 "../sysdeps/unix/sysv/linux/connect.c" 1
16 syscall
18 # 0 "" 2
19 #NO_APP
20 cmpq $-4096, %rax
21 ja .L11
22 rep ret
23 .p2align 4,,10
24 .p2align 3
25 .L2:
26 pushq %r12
27 pushq %rbp
28 movl %edx, %r12d
29 pushq %rbx
30 movq %rsi, %rbp
31 movl %edi, %ebx
32 subq $16, %rsp
33 call __pthread_enable_asynccancel@PLT
34 movl %r12d, %edx
35 movl %eax, %r8d
36 movq %rbp, %rsi
37 movl %ebx, %edi
38 movl $42, %eax
39 #APP
40 # 26 "../sysdeps/unix/sysv/linux/connect.c" 1
41 syscall
43 # 0 "" 2
44 #NO_APP
45 cmpq $-4096, %rax
46 ja .L12
47 .L6:
48 movl %r8d, %edi
49 movl %eax, 12(%rsp)
50 call __pthread_disable_asynccancel@PLT
51 movl 12(%rsp), %eax
52 addq $16, %rsp
53 popq %rbx
54 popq %rbp
55 popq %r12
56 ret
57 .p2align 4,,10
58 .p2align 3
59 .L11:
60 movq errno@gottpoff(%rip), %rdx
61 negl %eax
62 movl %eax, %fs:(%rdx)
63 movl $-1, %eax
64 ret
65 .L12:
66 movq errno@gottpoff(%rip), %rdx
67 negl %eax
68 movl %eax, %fs:(%rdx)
69 movl $-1, %eax
70 jmp .L6
71 .size __libc_connect, .-__libc_connect
72 .weak __connect
73 .set __connect,__libc_connect
74 .weak connect
75 .set connect,__libc_connect