clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_mutexattr_getprioceiling.s
blob82c488c810a3ed4a1997aa987b09abcb8c63bc1c
1 .text
2 .p2align 4,,15
3 .globl pthread_mutexattr_getprioceiling
4 .type pthread_mutexattr_getprioceiling, @function
5 pthread_mutexattr_getprioceiling:
6 movl (%rdi), %eax
7 sarl $12, %eax
8 andl $4095, %eax
9 je .L11
10 .L5:
11 movl %eax, (%rsi)
12 xorl %eax, %eax
13 ret
14 .p2align 4,,10
15 .p2align 3
16 .L11:
17 movl __sched_fifo_min_prio(%rip), %edx
18 cmpl $-1, %edx
19 je .L12
20 movl __sched_fifo_min_prio(%rip), %edx
21 testl %edx, %edx
22 jle .L5
23 movl __sched_fifo_min_prio(%rip), %eax
24 movl %eax, (%rsi)
25 xorl %eax, %eax
26 ret
27 .p2align 4,,10
28 .p2align 3
29 .L12:
30 subq $24, %rsp
31 movq %rsi, 8(%rsp)
32 movl %eax, 4(%rsp)
33 call __init_sched_fifo_prio@PLT
34 movq 8(%rsp), %rsi
35 movl 4(%rsp), %eax
36 movl __sched_fifo_min_prio(%rip), %edx
37 testl %edx, %edx
38 jle .L2
39 movl __sched_fifo_min_prio(%rip), %eax
40 .L2:
41 movl %eax, (%rsi)
42 xorl %eax, %eax
43 addq $24, %rsp
44 ret
45 .size pthread_mutexattr_getprioceiling, .-pthread_mutexattr_getprioceiling