OSDN Git Service

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