clarify the purpose of this project
[nyanglibc.git] / sysvipc / msgsnd.shared.s
blob59f781da0613ea40d16e55c834720e9c5f946cf3
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 __libc_msgsnd
9 .type __libc_msgsnd, @function
10 __libc_msgsnd:
11 movl %ecx, %r10d
12 #APP
13 # 26 "../sysdeps/unix/sysv/linux/msgsnd.c" 1
14 movl %fs:24,%eax
15 # 0 "" 2
16 #NO_APP
17 testl %eax, %eax
18 jne .L2
19 movl $69, %eax
20 #APP
21 # 26 "../sysdeps/unix/sysv/linux/msgsnd.c" 1
22 syscall
24 # 0 "" 2
25 #NO_APP
26 cmpq $-4096, %rax
27 ja .L11
28 rep ret
29 .p2align 4,,10
30 .p2align 3
31 .L2:
32 pushq %r13
33 pushq %r12
34 movl %ecx, %r13d
35 pushq %rbp
36 pushq %rbx
37 movq %rdx, %r12
38 movq %rsi, %rbp
39 movl %edi, %ebx
40 subq $24, %rsp
41 call __libc_enable_asynccancel
42 movl %r13d, %r10d
43 movl %eax, %r8d
44 movq %r12, %rdx
45 movq %rbp, %rsi
46 movl %ebx, %edi
47 movl $69, %eax
48 #APP
49 # 26 "../sysdeps/unix/sysv/linux/msgsnd.c" 1
50 syscall
52 # 0 "" 2
53 #NO_APP
54 cmpq $-4096, %rax
55 ja .L12
56 .L6:
57 movl %r8d, %edi
58 movl %eax, 12(%rsp)
59 call __libc_disable_asynccancel
60 movl 12(%rsp), %eax
61 addq $24, %rsp
62 popq %rbx
63 popq %rbp
64 popq %r12
65 popq %r13
66 ret
67 .p2align 4,,10
68 .p2align 3
69 .L11:
70 movq __libc_errno@gottpoff(%rip), %rdx
71 negl %eax
72 movl %eax, %fs:(%rdx)
73 movl $-1, %eax
74 ret
75 .L12:
76 movq __libc_errno@gottpoff(%rip), %rdx
77 negl %eax
78 movl %eax, %fs:(%rdx)
79 movl $-1, %eax
80 jmp .L6
81 .size __libc_msgsnd, .-__libc_msgsnd
82 .weak msgsnd
83 .set msgsnd,__libc_msgsnd
84 .hidden __libc_disable_asynccancel
85 .hidden __libc_enable_asynccancel