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