clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_mutexattr_setprioceiling.s
blobccf77afeb750893530de4fb77420a90d777c7487
1 .text
2 .p2align 4,,15
3 .globl pthread_mutexattr_setprioceiling
4 .type pthread_mutexattr_setprioceiling, @function
5 pthread_mutexattr_setprioceiling:
6 pushq %rbp
7 pushq %rbx
8 movq %rdi, %rbp
9 movl %esi, %ebx
10 subq $8, %rsp
11 movl __sched_fifo_min_prio(%rip), %eax
12 cmpl $-1, %eax
13 je .L4
14 movl __sched_fifo_max_prio(%rip), %eax
15 cmpl $-1, %eax
16 je .L4
17 movl __sched_fifo_min_prio(%rip), %eax
18 cmpl %ebx, %eax
19 jg .L7
20 .L5:
21 movl __sched_fifo_max_prio(%rip), %eax
22 cmpl %eax, %ebx
23 jg .L7
24 testl $-4096, %ebx
25 jne .L7
26 movl 0(%rbp), %esi
27 sall $12, %ebx
28 xorl %eax, %eax
29 andl $-16773121, %esi
30 orl %esi, %ebx
31 movl %ebx, 0(%rbp)
32 addq $8, %rsp
33 popq %rbx
34 popq %rbp
35 ret
36 .p2align 4,,10
37 .p2align 3
38 .L4:
39 call __init_sched_fifo_prio@PLT
40 movl __sched_fifo_min_prio(%rip), %eax
41 cmpl %ebx, %eax
42 jle .L5
43 .L7:
44 addq $8, %rsp
45 movl $22, %eax
46 popq %rbx
47 popq %rbp
48 ret
49 .size pthread_mutexattr_setprioceiling, .-pthread_mutexattr_setprioceiling