clarify the purpose of this project
[nyanglibc.git] / rt / mq_open.s
blob29d258ca691a29117319193a9a07ae8037e1b7f4
1 .text
2 .p2align 4,,15
3 .globl __mq_open
4 .type __mq_open, @function
5 __mq_open:
6 movq %rdx, -32(%rsp)
7 movq %rcx, -24(%rsp)
8 cmpb $47, (%rdi)
9 jne .L14
10 xorl %r10d, %r10d
11 xorl %edx, %edx
12 testb $64, %sil
13 jne .L15
14 .L4:
15 addq $1, %rdi
16 movl $240, %eax
17 #APP
18 # 50 "../sysdeps/unix/sysv/linux/mq_open.c" 1
19 syscall
21 # 0 "" 2
22 #NO_APP
23 cmpq $-4096, %rax
24 ja .L16
25 rep ret
26 .p2align 4,,10
27 .p2align 3
28 .L15:
29 leaq 8(%rsp), %rax
30 movl $24, -72(%rsp)
31 movq %rax, -64(%rsp)
32 leaq -48(%rsp), %rax
33 movl 16(%rax), %edx
34 movq 24(%rax), %r10
35 movq %rax, -56(%rsp)
36 jmp .L4
37 .p2align 4,,10
38 .p2align 3
39 .L16:
40 movq errno@gottpoff(%rip), %rdx
41 negl %eax
42 movl %eax, %fs:(%rdx)
43 movl $-1, %eax
44 ret
45 .p2align 4,,10
46 .p2align 3
47 .L14:
48 movq errno@gottpoff(%rip), %rax
49 movl $22, %fs:(%rax)
50 movl $-1, %eax
51 ret
52 .size __mq_open, .-__mq_open
53 .globl mq_open
54 .set mq_open,__mq_open
55 .section .rodata.str1.8,"aMS",@progbits,1
56 .align 8
57 .LC0:
58 .string "invalid mq_open call: O_CREAT without mode and attr"
59 .text
60 .p2align 4,,15
61 .globl __mq_open_2
62 .type __mq_open_2, @function
63 __mq_open_2:
64 testb $64, %sil
65 jne .L22
66 xorl %eax, %eax
67 jmp __mq_open
68 .L22:
69 leaq .LC0(%rip), %rdi
70 subq $8, %rsp
71 call __fortify_fail@PLT
72 .size __mq_open_2, .-__mq_open_2