clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_getschedparam.shared.s
blobfbd60fae5371f70565b614176ebeb6eeb928b657
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 __pthread_getschedparam
9 .type __pthread_getschedparam, @function
10 __pthread_getschedparam:
11 movl 720(%rdi), %eax
12 testl %eax, %eax
13 jle .L15
14 pushq %r13
15 pushq %r12
16 movq %rdx, %r12
17 pushq %rbp
18 pushq %rbx
19 movq %rsi, %rbp
20 movq %rdi, %rbx
21 subq $8, %rsp
22 #APP
23 # 39 "pthread_getschedparam.c" 1
24 movl %fs:24,%eax
25 # 0 "" 2
26 #NO_APP
27 testl %eax, %eax
28 leaq 1560(%rdi), %r13
29 jne .L3
30 movl $1, %edx
31 #APP
32 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
33 cmpxchgl %edx, 0(%r13)
34 # 0 "" 2
35 #NO_APP
36 .L4:
37 movl 780(%rbx), %eax
38 testb $32, %al
39 je .L26
40 .L5:
41 testb $64, %al
42 je .L27
43 .L11:
44 movl 1596(%rbx), %eax
45 xorl %r8d, %r8d
46 movl %eax, 0(%rbp)
47 movl 1592(%rbx), %eax
48 movl %eax, (%r12)
49 .L8:
50 #APP
51 # 69 "pthread_getschedparam.c" 1
52 movl %fs:24,%eax
53 # 0 "" 2
54 #NO_APP
55 testl %eax, %eax
56 jne .L9
57 subl $1, 1560(%rbx)
58 .L1:
59 addq $8, %rsp
60 movl %r8d, %eax
61 popq %rbx
62 popq %rbp
63 popq %r12
64 popq %r13
65 ret
66 .p2align 4,,10
67 .p2align 3
68 .L27:
69 movl 720(%rbx), %edi
70 call __GI___sched_getscheduler
71 cmpl $-1, %eax
72 movl %eax, 1596(%rbx)
73 jne .L28
74 .L24:
75 movl $1, %r8d
76 jmp .L8
77 .p2align 4,,10
78 .p2align 3
79 .L26:
80 movl 720(%rbx), %edi
81 leaq 1592(%rbx), %rsi
82 call __GI___sched_getparam
83 testl %eax, %eax
84 je .L29
85 testb $64, 780(%rbx)
86 jne .L24
87 movl 720(%rbx), %edi
88 call __GI___sched_getscheduler
89 movl %eax, 1596(%rbx)
90 addl $1, %eax
91 je .L24
92 orl $64, 780(%rbx)
93 jmp .L24
94 .p2align 4,,10
95 .p2align 3
96 .L29:
97 movl 780(%rbx), %eax
98 orl $32, %eax
99 movl %eax, 780(%rbx)
100 jmp .L5
101 .p2align 4,,10
102 .p2align 3
103 .L15:
104 movl $3, %r8d
105 movl %r8d, %eax
107 .p2align 4,,10
108 .p2align 3
109 .L3:
110 xorl %eax, %eax
111 movl $1, %edx
112 lock cmpxchgl %edx, 0(%r13)
113 je .L4
114 movq %r13, %rdi
115 call __lll_lock_wait_private
116 jmp .L4
117 .p2align 4,,10
118 .p2align 3
119 .L9:
120 xorl %eax, %eax
121 #APP
122 # 69 "pthread_getschedparam.c" 1
123 xchgl %eax, 0(%r13)
124 # 0 "" 2
125 #NO_APP
126 cmpl $1, %eax
127 jle .L1
128 xorl %r10d, %r10d
129 movl $1, %edx
130 movl $129, %esi
131 movq %r13, %rdi
132 movl $202, %eax
133 #APP
134 # 69 "pthread_getschedparam.c" 1
135 syscall
137 # 0 "" 2
138 #NO_APP
139 jmp .L1
140 .L28:
141 orl $64, 780(%rbx)
142 jmp .L11
143 .size __pthread_getschedparam, .-__pthread_getschedparam
144 .globl pthread_getschedparam
145 .set pthread_getschedparam,__pthread_getschedparam
146 .hidden __lll_lock_wait_private