1 /* Copyright (C) 2003-2013 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
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.
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.
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/>. */
19 #include <shlib-compat.h>
20 #include <pthread-errnos.h>
21 #include <tcb-offsets.h>
22 #include <structsem.h>
23 #include <lowlevellock.h>
24 #include "lowlevel-atomic.h"
28 # error "code needs to be rewritten for VALUE != 0"
34 .type __new_sem_wait,@function
40 cfi_personality(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect,
41 DW.ref.__gcc_personality_v0)
42 cfi_lsda(DW_EH_PE_pcrel | DW_EH_PE_sdata4, .LexceptSTART)
44 cfi_personality(DW_EH_PE_absptr, __gcc_personality_v0)
45 cfi_lsda(DW_EH_PE_absptr, .LexceptSTART)
48 cfi_adjust_cfa_offset (4)
49 cfi_rel_offset (r8, 0)
51 cfi_adjust_cfa_offset (4)
52 cfi_rel_offset (r10, 0)
54 cfi_adjust_cfa_offset (4)
55 cfi_rel_offset (r12, 0)
57 cfi_adjust_cfa_offset (4)
58 cfi_rel_offset (pr, 0)
68 CMPXCHG (r4, @r8, r3, r2)
76 cfi_adjust_cfa_offset (-4)
79 cfi_adjust_cfa_offset (-4)
82 cfi_adjust_cfa_offset (-4)
86 /* Omit CFI for restore in delay slot. */
91 INC (@(NWAITERS,r8),r2)
103 mov.l @(PRIVATE,r8), r5
105 mov.l @(PRIVATE,r8), r5
126 cmp/eq #-EWOULDBLOCK, r0
138 CMPXCHG (r4, @r8, r3, r2)
142 DEC (@(NWAITERS,r8), r2)
149 DEC (@(NWAITERS,r8), r2)
170 .long _GLOBAL_OFFSET_TABLE_
172 .long __pthread_enable_asynccancel-.Lenable0b
174 .long __pthread_disable_asynccancel-.Ldisable0b
175 .size __new_sem_wait,.-__new_sem_wait
176 versioned_symbol(libpthread, __new_sem_wait, sem_wait, GLIBC_2_1)
179 .type sem_wait_cleanup,@function
181 DEC (@(NWAITERS,r8), r2)
194 .long _Unwind_Resume@GOTOFF
200 .size sem_wait_cleanup,.-sem_wait_cleanup
203 .section .gcc_except_table,"a",@progbits
205 .byte DW_EH_PE_omit ! @LPStart format (omit)
206 .byte DW_EH_PE_omit ! @TType format (omit)
207 .byte DW_EH_PE_uleb128 ! call-site format
208 .uleb128 .Lcstend-.Lcstbegin
210 .uleb128 .LcleanupSTART-.LSTARTCODE
211 .uleb128 .LcleanupEND-.LcleanupSTART
212 .uleb128 sem_wait_cleanup-.LSTARTCODE
214 .uleb128 .LcallUR-.LSTARTCODE
215 .uleb128 .LENDCODE-.LcallUR
221 .hidden DW.ref.__gcc_personality_v0
222 .weak DW.ref.__gcc_personality_v0
223 .section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
225 .type DW.ref.__gcc_personality_v0, @object
226 .size DW.ref.__gcc_personality_v0, 4
227 DW.ref.__gcc_personality_v0:
228 .long __gcc_personality_v0