]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libpthread / nptl / sysdeps / unix / sysv / linux / sh / pthread_cond_timedwait.S
1 /* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
2    This file is part of the GNU C Library.
3
4    The GNU C Library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Lesser General Public
6    License as published by the Free Software Foundation; either
7    version 2.1 of the License, or (at your option) any later version.
8
9    The GNU C Library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Lesser General Public License for more details.
13
14    You should have received a copy of the GNU Lesser General Public
15    License along with the GNU C Library; if not, see
16    <http://www.gnu.org/licenses/>.  */
17
18 #include <sysdep.h>
19 #include <lowlevellock.h>
20 #include <lowlevelcond.h>
21 #include <pthread-errnos.h>
22 #include <bits/kernel-features.h>
23 #include <tcb-offsets.h>
24 #include "lowlevel-atomic.h"
25
26         .text
27
28 /* int pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
29                                const struct timespec *abstime)  */
30         .globl  __pthread_cond_timedwait
31         .type   __pthread_cond_timedwait, @function
32         .protected      __pthread_cond_timedwait
33         .align  5
34 __pthread_cond_timedwait:
35 .LSTARTCODE:
36         mov.l   r8, @-r15
37 .Lpush_r8:
38         mov.l   r9, @-r15
39 .Lpush_r9:
40         mov.l   r10, @-r15
41 .Lpush_r10:
42         mov.l   r11, @-r15
43 .Lpush_r11:
44         mov.l   r12, @-r15
45 .Lpush_r12:
46         mov.l   r13, @-r15
47 .Lpush_r13:
48         sts.l   pr, @-r15
49 .Lpush_pr:
50         add     #-64, r15
51 .Lalloc:
52         mov     r4, r8
53         mov     r5, r9
54         mov     r6, r13
55 #ifdef __PIC__
56         mova    .Lgot0, r0
57         mov.l   .Lgot0, r12
58         add     r0, r12
59 #endif
60
61         mov.l   @(4,r13), r0
62         mov.l   .L1g, r1
63         cmp/hs  r1, r0
64         bf      0f
65         bra     18f
66          mov    #EINVAL, r0
67 0:
68         /* Get internal lock.  */
69         mov     #0, r3
70         mov     #1, r4
71 #if cond_lock != 0
72         CMPXCHG (r3, @(cond_lock,r8), r4, r2)
73 #else
74         CMPXCHG (r3, @r8, r4, r2)
75 #endif
76         bt      2f
77         bra     1f
78          nop
79 #ifdef __PIC__
80         .align  2
81 .Lgot0:
82         .long   _GLOBAL_OFFSET_TABLE_
83 #endif
84
85 2:
86         /* Store the reference to the mutex.  If there is already a
87            different value in there this is a bad user bug.  */
88         mov.l   @(dep_mutex,r8),r0
89         cmp/eq  #-1, r0
90         bt      17f
91         mov.l   r9, @(dep_mutex,r8)
92
93 17:
94         /* Unlock the mutex.  */
95         mov.l   .Lmunlock1, r1
96         mov     #0, r5
97         bsrf    r1
98          mov    r9, r4
99 .Lmunlock1b:
100
101         tst     r0, r0
102         bt      0f
103         bra     16f
104          nop
105 0:
106         mov     #1, r2
107         mov     #0, r3
108
109         clrt
110         mov.l   @(total_seq,r8),r0
111         mov.l   @(total_seq+4,r8),r1
112         addc    r2, r0
113         addc    r3, r1
114         mov.l   r0,@(total_seq,r8)
115         mov.l   r1,@(total_seq+4,r8)
116         mov.l   @(cond_futex,r8), r0
117         add     r2, r0
118         mov.l   r0, @(cond_futex,r8)
119         mov     #(1 << nwaiters_shift), r2
120         mov.l   @(cond_nwaiters,r8), r0
121         add     r2, r0
122         mov.l   r0, @(cond_nwaiters,r8)
123
124         /* Get and store current wakeup_seq value.  */
125         mov.l   @(wakeup_seq,r8), r10
126         mov.l   @(wakeup_seq+4,r8), r11
127         mov.l   @(broadcast_seq,r8), r0
128         mov.l   r0, @(4,r15)
129
130 8:
131         /* Get current time.  */
132 #ifdef __NR_clock_gettime
133         /* Get the clock number.         */
134         mov.l   @(cond_nwaiters,r8), r4
135         mov     #((1 << nwaiters_shift) - 1), r0
136         and     r0, r4
137         /* Only clocks 0 and 1 are allowed.  Both are handled in the
138            kernel.  */
139         mov     r15, r5
140         add     #16, r5
141         mov.w   .L__NR_clock_gettime, r3
142         trapa   #0x12
143         SYSCALL_INST_PAD
144 # ifndef __ASSUME_POSIX_TIMERS
145         cmp/eq  #-ENOSYS, r0
146         bt      19f
147 # endif
148
149         /* Compute relative timeout.  */
150         mov.l   @r13, r2
151         mov.l   @(4,r13), r3
152         mov.l   @(16,r15), r0
153         bra     0f
154          mov.l  @(20,r15), r1
155 .L__NR_clock_gettime:
156         .word   __NR_clock_gettime
157
158 # ifndef __ASSUME_POSIX_TIMERS
159 19:
160         mov     r15, r4
161         add     #16, r4
162         mov     #0, r5
163         mov     #__NR_gettimeofday, r3
164         trapa   #0x12
165         SYSCALL_INST_PAD
166
167         /* Compute relative timeout.  */
168         mov.l   @(20,r15), r0
169         mov.w   .L1k, r1
170         dmulu.l r0, r1          /* Micro seconds to nano seconds.  */
171         mov.l   @r13, r2
172         mov.l   @(4,r13), r3
173         mov.l   @(16,r15), r0
174         sts     macl, r1
175 #endif
176 0:
177 #else
178         mov     r15, r4
179         add     #16, r4
180         mov     #0, r5
181         mov     #__NR_gettimeofday, r3
182         trapa   #0x12
183         SYSCALL_INST_PAD
184
185         /* Compute relative timeout.  */
186         mov.l   @(20,r15), r0
187         mov.w   .L1k, r1
188         dmulu.l r0, r1          /* Micro seconds to nano seconds.  */
189         mov.l   @r13, r2
190         mov.l   @(4,r13), r3
191         mov.l   @(16,r15), r0
192         sts     macl, r1
193 #endif
194         sub     r0, r2
195         clrt
196         subc    r1, r3
197         bf      12f
198         mov.l   .L1g, r1
199         add     r1, r3
200         add     #-1, r2
201 12:
202         mov     #-ETIMEDOUT, r1
203         mov.l   r1, @(12,r15)
204         cmp/pz  r2
205         bf      6f              /* Time is already up.  */
206
207         /* Store relative timeout.  */
208         mov.l   r2, @(16,r15)
209         mov.l   r3, @(20,r15)
210         mov.l   @(cond_futex,r8), r1
211         mov.l   r1, @(8,r15)
212
213         /* Unlock.  */
214 #if cond_lock != 0
215         DEC (@(cond_lock,r8), r2)
216 #else
217         DEC (@r8, r2)
218 #endif
219         tst     r2, r2
220         bt      4f
221         bra     3f
222          nop
223 4:
224 .LcleanupSTART:
225         mov.l   .Lenable1, r1
226         bsrf    r1
227          nop
228 .Lenable1b:
229         mov.l   r0, @r15
230
231         mov     r15, r7
232         add     #16, r7
233         mov.l   @(dep_mutex,r8), r0
234         cmp/eq  #-1, r0
235         bt/s    99f
236          mov    #FUTEX_WAIT, r5
237 #ifdef __ASSUME_PRIVATE_FUTEX
238         mov     #(FUTEX_WAIT|FUTEX_PRIVATE_FLAG), r5
239         extu.b  r5, r5
240 #else
241         stc     gbr, r1
242         mov.w   .Lpfoff, r2
243         add     r2, r1
244         mov.l   @r1, r5
245         mov     #FUTEX_WAIT, r0
246         or      r0, r5
247 #endif
248 99:
249         mov.l   @(8,r15), r6
250         mov     r8, r4
251         add     #cond_futex, r4
252         mov     #SYS_futex, r3
253         extu.b  r3, r3
254         trapa   #0x14
255         SYSCALL_INST_PAD
256         mov.l   r0, @(12,r15)
257
258         mov.l   .Ldisable1, r1
259         bsrf    r1
260          mov.l  @r15, r4
261 .Ldisable1b:
262 .LcleanupEND:
263
264         /* Lock.  */
265         mov     #0, r3
266         mov     #1, r4
267 #if cond_lock != 0
268         CMPXCHG (r3, @(cond_lock,r8), r4, r2)
269 #else
270         CMPXCHG (r3, @r8, r4, r2)
271 #endif
272         bf      5f
273 6:
274         mov.l   @(broadcast_seq,r8), r0
275         mov.l   @(4,r15), r1
276         cmp/eq  r0, r1
277         bf      23f
278
279         mov.l   @(woken_seq,r8), r0
280         mov.l   @(woken_seq+4,r8), r1
281
282         mov.l   @(wakeup_seq,r8), r2
283         mov.l   @(wakeup_seq+4,r8), r3
284
285         cmp/eq  r3, r11
286         bf      7f
287         cmp/eq  r2, r10
288         bt      15f
289 7:
290         cmp/eq  r1, r3
291         bf      9f
292         cmp/eq  r0, r2
293         bf      9f
294 15:
295         mov.l   @(12,r15),r0
296         cmp/eq  #-ETIMEDOUT, r0
297         bf      8b
298
299         mov     #1, r2
300         mov     #0, r3
301
302         clrt
303         mov.l   @(wakeup_seq,r8),r0
304         mov.l   @(wakeup_seq+4,r8),r1
305         addc    r2, r0
306         addc    r3, r1
307         mov.l   r0,@(wakeup_seq,r8)
308         mov.l   r1,@(wakeup_seq+4,r8)
309         mov.l   @(cond_futex,r8),r0
310         add     r2, r0
311         mov.l   r0,@(cond_futex,r8)
312         mov     #ETIMEDOUT, r0
313         bra     14f
314          mov.l  r0, @(24,r15)
315
316 23:
317         mov     #0, r0
318         bra     24f
319          mov.l  r0, @(24,r15)
320
321 9:
322         mov     #0, r0
323         mov.l   r0, @(24,r15)
324 14:
325         mov     #1, r2
326         mov     #0, r3
327
328         clrt
329         mov.l   @(woken_seq,r8),r0
330         mov.l   @(woken_seq+4,r8),r1
331         addc    r2, r0
332         addc    r3, r1
333         mov.l   r0,@(woken_seq,r8)
334         mov.l   r1,@(woken_seq+4,r8)
335
336 24:
337         mov     #(1 << nwaiters_shift), r2
338         mov.l   @(cond_nwaiters,r8),r0
339         sub     r2, r0
340         mov.l   r0,@(cond_nwaiters,r8)
341
342         /* Wake up a thread which wants to destroy the condvar object.  */
343         mov.l   @(total_seq,r8),r0
344         mov.l   @(total_seq+4,r8),r1
345         and     r1, r0
346         not     r0, r0
347         cmp/eq  #0, r0
348         bf/s    25f
349          mov    #((1 << nwaiters_shift) - 1), r1
350         not     r1, r1
351         mov.l   @(cond_nwaiters,r8),r0
352         tst     r1, r0
353         bf      25f
354
355         mov     r8, r4
356         add     #cond_nwaiters, r4
357         mov.l   @(dep_mutex,r8), r0
358         cmp/eq  #-1, r0
359         bt/s    99f
360          mov    #FUTEX_WAKE, r5
361 #ifdef __ASSUME_PRIVATE_FUTEX
362         mov     #(FUTEX_WAKE|FUTEX_PRIVATE_FLAG), r5
363         extu.b  r5, r5
364 #else
365         stc     gbr, r1
366         mov.w   .Lpfoff, r2
367         add     r2, r1
368         mov.l   @r1, r5
369         mov     #FUTEX_WAKE, r0
370         or      r0, r5
371 #endif
372 99:
373         mov     #1, r6
374         mov     #0, r7
375         mov     #SYS_futex, r3
376         extu.b  r3, r3
377         trapa   #0x14
378         SYSCALL_INST_PAD
379
380 25:
381 #if cond_lock != 0
382         DEC (@(cond_lock,r8), r2)
383 #else
384         DEC (@r8, r2)
385 #endif
386         tst     r2, r2
387         bf      10f
388
389 11:
390         mov     r9, r4
391         mov.l   .Lmlocki1, r1
392         bsrf    r1
393          nop
394 .Lmlocki1b:
395
396         /* We return the result of the mutex_lock operation if it failed.  */
397         tst     r0, r0
398         bf      18f
399         mov.l   @(24,r15), r0
400
401 18:
402         add     #64, r15
403         lds.l   @r15+, pr
404         mov.l   @r15+, r13
405         mov.l   @r15+, r12
406         mov.l   @r15+, r11
407         mov.l   @r15+, r10
408         mov.l   @r15+, r9
409         rts
410          mov.l  @r15+, r8
411
412 #ifndef __ASSUME_PRIVATE_FUTEX
413 .Lpfoff:
414         .word   PRIVATE_FUTEX - TLS_PRE_TCB_SIZE
415 #endif
416 .L1k:
417         .word   1000
418         .align  2
419 .Lmunlock1:
420         .long   __pthread_mutex_unlock_usercnt-.Lmunlock1b
421 .Lenable1:
422         .long   __pthread_enable_asynccancel-.Lenable1b
423 .Ldisable1:
424         .long   __pthread_disable_asynccancel-.Ldisable1b
425 .Lmlocki1:
426         .long   __pthread_mutex_cond_lock-.Lmlocki1b
427 .L1g:
428         .long   1000000000
429
430 1:
431         /* Initial locking failed.  */
432         mov     r8, r5
433 #if cond_lock != 0
434         add     #cond_lock, r5
435 #endif
436         mov.l   @(dep_mutex,r8), r0
437         cmp/eq  #-1, r0
438         bf/s    99f
439          mov    #LLL_PRIVATE, r6
440         mov     #LLL_SHARED, r6
441 99:
442         extu.b  r6, r6
443         mov.l   .Lwait2, r1
444         bsrf    r1
445          mov    r2, r4
446 .Lwait2b:
447         bra     2b
448          nop
449
450 3:
451         /* Unlock in loop requires wakeup.  */
452         mov     r8, r4
453 #if cond_lock != 0
454         add     #cond_lock, r4
455 #endif
456         mov.l   @(dep_mutex,r8), r0
457         cmp/eq  #-1, r0
458         bf/s    99f
459          mov    #LLL_PRIVATE, r5
460         mov     #LLL_SHARED, r5
461 99:
462         mov.l   .Lmwait2, r1
463         bsrf    r1
464          extu.b r5, r5
465 .Lmwait2b:
466         bra     4b
467          nop
468
469 5:
470         /* Locking in loop failed.  */
471         mov     r8, r5
472 #if cond_lock != 0
473         add     #cond_lock, r5
474 #endif
475         mov.l   @(dep_mutex,r8), r0
476         cmp/eq  #-1, r0
477         bf/s    99f
478          mov    #LLL_PRIVATE, r6
479         mov     #LLL_SHARED, r6
480 99:
481         extu.b  r6, r6
482         mov.l   .Lwait3, r1
483         bsrf    r1
484          mov    r2, r4
485 .Lwait3b:
486         bra     6b
487          nop
488
489 10:
490         /* Unlock after loop requires wakeup.  */
491         mov     r8, r4
492 #if cond_lock != 0
493         add     #cond_lock, r4
494 #endif
495         mov.l   @(dep_mutex,r8), r0
496         cmp/eq  #-1, r0
497         bf/s    99f
498          mov    #LLL_PRIVATE, r5
499         mov     #LLL_SHARED, r5
500 99:
501         mov.l   .Lmwait3, r1
502         bsrf    r1
503          extu.b r5, r5
504 .Lmwait3b:
505         bra     11b
506          nop
507
508 16:
509         /* The initial unlocking of the mutex failed.  */
510         mov.l   r0, @(24,r15)
511 #if cond_lock != 0
512         DEC (@(cond_lock,r8), r2)
513 #else
514         DEC (@r8, r2)
515 #endif
516         tst     r2, r2
517         bf      17f
518
519         mov     r8, r4
520 #if cond_lock != 0
521         add     #cond_lock, r4
522 #endif
523         mov.l   @(dep_mutex,r8), r0
524         cmp/eq  #-1, r0
525         bf/s    99f
526          mov    #LLL_PRIVATE, r5
527         mov     #LLL_SHARED, r5
528 99:
529         mov.l   .Lmwait4, r1
530         bsrf    r1
531          extu.b r5, r5
532 .Lmwait4b:
533 17:
534         bra     18b
535          mov.l  @(24,r15), r0
536
537         .align  2
538 .Lwait2:
539         .long   __lll_lock_wait-.Lwait2b
540 .Lmwait2:
541         .long   __lll_unlock_wake-.Lmwait2b
542 .Lwait3:
543         .long   __lll_lock_wait-.Lwait3b
544 .Lmwait3:
545         .long   __lll_unlock_wake-.Lmwait3b
546 .Lmwait4:
547         .long   __lll_unlock_wake-.Lmwait4b
548         .size   __pthread_cond_timedwait, .-__pthread_cond_timedwait
549 weak_alias (__pthread_cond_timedwait, pthread_cond_timedwait)
550
551
552         .type   __condvar_tw_cleanup, @function
553 __condvar_tw_cleanup:
554         mov     r4, r11
555
556         /* Get internal lock.  */
557         mov     #0, r3
558         mov     #1, r4
559 #if cond_lock != 0
560         CMPXCHG (r3, @(cond_lock,r8), r4, r2)
561 #else
562         CMPXCHG (r3, @r8, r4, r2)
563 #endif
564         bt      1f
565          nop
566
567         mov     r8, r5
568 #if cond_lock != 0
569         add     #cond_lock, r5
570 #endif
571         mov.l   @(dep_mutex,r8), r0
572         cmp/eq  #-1, r0
573         bf/s    99f
574          mov    #LLL_PRIVATE, r6
575         mov     #LLL_SHARED, r6
576 99:
577         extu.b  r6, r6
578         mov.l   .Lwait5, r1
579         bsrf    r1
580          mov    r2, r4
581 .Lwait5b:
582
583 1:
584         mov.l   @(broadcast_seq,r8), r0
585         mov.l   @(4,r15), r1
586         cmp/eq  r0, r1
587         bf      3f
588
589         mov     #1, r2
590         mov     #0, r3
591
592         /* We increment the wakeup_seq counter only if it is lower than
593            total_seq.  If this is not the case the thread was woken and
594            then canceled.  In this case we ignore the signal.  */
595         mov.l   @(total_seq+4,r8), r0
596         mov.l   @(wakeup_seq+4,r8), r1
597         cmp/hi  r1, r0
598         bt/s    6f
599          cmp/hi r0, r1
600         bt      7f
601         mov.l   @(total_seq,r8), r0
602         mov.l   @(wakeup_seq,r8), r1
603         cmp/hs  r0, r1
604         bt      7f
605
606 6:
607         clrt
608         mov.l   @(wakeup_seq,r8),r0
609         mov.l   @(wakeup_seq+4,r8),r1
610         addc    r2, r0
611         addc    r3, r1
612         mov.l   r0,@(wakeup_seq,r8)
613         mov.l   r1,@(wakeup_seq+4,r8)
614         mov.l   @(cond_futex,r8),r0
615         add     r2, r0
616         mov.l   r0,@(cond_futex,r8)
617
618 7:
619         clrt
620         mov.l   @(woken_seq,r8),r0
621         mov.l   @(woken_seq+4,r8),r1
622         addc    r2, r0
623         addc    r3, r1
624         mov.l   r0,@(woken_seq,r8)
625         mov.l   r1,@(woken_seq+4,r8)
626
627 3:
628         mov     #(1 << nwaiters_shift), r2
629         mov.l   @(cond_nwaiters,r8),r0
630         sub     r2, r0
631         mov.l   r0,@(cond_nwaiters,r8)
632
633         /* Wake up a thread which wants to destroy the condvar object.  */
634         mov     #0, r10
635         mov.l   @(total_seq,r8),r0
636         mov.l   @(total_seq+4,r8),r1
637         and     r1, r0
638         not     r0, r0
639         cmp/eq  #0, r0
640         bf/s    4f
641          mov    #((1 << nwaiters_shift) - 1), r1
642         not     r1, r1
643         mov.l   @(cond_nwaiters,r8),r0
644         tst     r1, r0
645         bf      4f
646
647         mov     r8, r4
648         add     #cond_nwaiters, r4
649         mov     #FUTEX_WAKE, r5
650         mov     #1, r6
651         mov     #0, r7
652         mov     #SYS_futex, r3
653         extu.b  r3, r3
654         trapa   #0x14
655         SYSCALL_INST_PAD
656         mov     #1, r10
657
658 4:
659 #if cond_lock != 0
660         DEC (@(cond_lock,r8), r2)
661 #else
662         DEC (@r8, r2)
663 #endif
664         tst     r2, r2
665         bt      2f
666
667         mov     r8, r4
668 #if cond_lock != 0
669         add     #cond_lock, r4
670 #endif
671         mov.l   @(dep_mutex,r8), r0
672         cmp/eq  #-1, r0
673         bf/s    99f
674          mov    #LLL_PRIVATE, r5
675         mov     #LLL_SHARED, r5
676 99:
677         mov.l   .Lmwait5, r1
678         bsrf    r1
679          extu.b r5, r5
680 .Lmwait5b:
681
682 2:
683         /* Wake up all waiters to make sure no signal gets lost.  */
684         tst     r10, r10
685         bf/s    5f
686          mov    r8, r4
687         add     #cond_futex, r4
688         mov     #FUTEX_WAKE, r5
689         mov     #-1, r6
690         shlr    r6              /* r6 = 0x7fffffff */
691         mov     #0, r7
692         mov     #SYS_futex, r3
693         extu.b  r3, r3
694         trapa   #0x14
695         SYSCALL_INST_PAD
696
697 5:
698         mov.l   .Lmlocki5, r1
699         bsrf    r1
700          mov     r9, r4
701 .Lmlocki5b:
702
703 .LcallUR:
704         mov.l   .Lresume, r1
705 #ifdef __PIC__
706         add     r12, r1
707 #endif
708         jsr     @r1
709          mov    r11, r4
710         sleep
711
712         .align  2
713 .Lwait5:
714         .long   __lll_lock_wait-.Lwait5b
715 .Lmwait5:
716         .long   __lll_unlock_wake-.Lmwait5b
717 .Lmlocki5:
718         .long   __pthread_mutex_cond_lock-.Lmlocki5b
719 .Lresume:
720 #ifdef __PIC__
721         .long   _Unwind_Resume@GOTOFF
722 #else
723         .long   _Unwind_Resume
724 #endif
725 .LENDCODE:
726         .size   __condvar_tw_cleanup, .-__condvar_tw_cleanup
727
728
729         .section .gcc_except_table,"a",@progbits
730 .LexceptSTART:
731         .byte   0xff                            ! @LPStart format (omit)
732         .byte   0xff                            ! @TType format (omit)
733         .byte   0x0b                            ! call-site format
734                                                 ! DW_EH_PE_sdata4
735         .uleb128 .Lcstend-.Lcstbegin
736 .Lcstbegin:
737         .ualong .LcleanupSTART-.LSTARTCODE
738         .ualong .LcleanupEND-.LcleanupSTART
739         .ualong __condvar_tw_cleanup-.LSTARTCODE
740         .uleb128  0
741         .ualong .LcallUR-.LSTARTCODE
742         .ualong .LENDCODE-.LcallUR
743         .ualong 0
744         .uleb128  0
745 .Lcstend:
746
747         .section .eh_frame,"a",@progbits
748 .LSTARTFRAME:
749         .ualong .LENDCIE-.LSTARTCIE             ! Length of the CIE.
750 .LSTARTCIE:
751         .ualong 0                               ! CIE ID.
752         .byte   1                               ! Version number.
753 #ifdef SHARED
754         .string "zPLR"                          ! NUL-terminated augmentation
755                                                 ! string.
756 #else
757         .string "zPL"                           ! NUL-terminated augmentation
758                                                 ! string.
759 #endif
760         .uleb128 1                              ! Code alignment factor.
761         .sleb128 -4                             ! Data alignment factor.
762         .byte   0x11                            ! Return address register
763                                                 ! column.
764 #ifdef SHARED
765         .uleb128 7                              ! Augmentation value length.
766         .byte   0x9b                            ! Personality: DW_EH_PE_pcrel
767                                                 ! + DW_EH_PE_sdata4
768                                                 ! + DW_EH_PE_indirect
769         .ualong DW.ref.__gcc_personality_v0-.
770         .byte   0x1b                            ! LSDA Encoding: DW_EH_PE_pcrel
771                                                 ! + DW_EH_PE_sdata4.
772         .byte   0x1b                            ! FDE Encoding: DW_EH_PE_pcrel
773                                                 ! + DW_EH_PE_sdata4.
774 #else
775         .uleb128 6                              ! Augmentation value length.
776         .byte   0x0                             ! Personality: absolute
777         .ualong __gcc_personality_v0
778         .byte   0x0                             ! LSDA Encoding: absolute
779 #endif
780         .byte 0x0c                              ! DW_CFA_def_cfa
781         .uleb128 0xf
782         .uleb128 0
783         .align 2
784 .LENDCIE:
785
786         .ualong .LENDFDE-.LSTARTFDE             ! Length of the FDE.
787 .LSTARTFDE:
788         .ualong .LSTARTFDE-.LSTARTFRAME         ! CIE pointer.
789 #ifdef SHARED
790         .ualong .LSTARTCODE-.                   ! PC-relative start address
791                                                 ! of the code.
792 #else
793         .ualong .LSTARTCODE                     ! Start address of the code.
794 #endif
795         .ualong .LENDCODE-.LSTARTCODE           ! Length of the code.
796         .uleb128 4                              ! Augmentation size
797 #ifdef SHARED
798         .ualong .LexceptSTART-.
799 #else
800         .ualong .LexceptSTART
801 #endif
802         .byte   0x4
803         .ualong .Lpush_r8-.LSTARTCODE
804         .byte   0xe
805         .uleb128 4
806         .byte   0x88
807         .uleb128 1
808         .byte   0x4
809         .ualong .Lpush_r9-.Lpush_r8
810         .byte   0xe
811         .uleb128 8
812         .byte   0x89
813         .uleb128 2
814         .byte   0x4
815         .ualong .Lpush_r10-.Lpush_r9
816         .byte   0xe
817         .uleb128 12
818         .byte   0x8a
819         .uleb128 3
820         .byte   0x4
821         .ualong .Lpush_r11-.Lpush_r10
822         .byte   0xe
823         .uleb128 16
824         .byte   0x8b
825         .uleb128 4
826         .byte   0x4
827         .ualong .Lpush_r12-.Lpush_r11
828         .byte   0xe
829         .uleb128 20
830         .byte   0x8c
831         .uleb128 5
832         .byte   0x4
833         .ualong .Lpush_r13-.Lpush_r12
834         .byte   0xe
835         .uleb128 24
836         .byte   0x8d
837         .uleb128 6
838         .byte   0x4
839         .ualong .Lpush_pr-.Lpush_r13
840         .byte   0xe
841         .uleb128 28
842         .byte   0x91
843         .uleb128 7
844         .byte   0x4
845         .ualong .Lalloc-.Lpush_pr
846         .byte   0xe
847         .uleb128 92
848         .align  2
849 .LENDFDE:
850
851 #ifdef SHARED
852         .hidden DW.ref.__gcc_personality_v0
853         .weak   DW.ref.__gcc_personality_v0
854         .section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
855         .align 4
856         .type   DW.ref.__gcc_personality_v0, @object
857         .size   DW.ref.__gcc_personality_v0, 4
858 DW.ref.__gcc_personality_v0:
859         .long   __gcc_personality_v0
860 #endif