1 /* Copyright (C) 2003, 2004, 2007 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, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 #include <shlib-compat.h>
21 #include <pthread-errnos.h>
22 #include <tcb-offsets.h>
23 #include <structsem.h>
24 #include <lowlevellock.h>
25 #include "lowlevel-atomic.h"
29 # error "code needs to be rewritten for VALUE != 0"
35 .type __new_sem_wait,@function
56 CMPXCHG (r4, @r8, r3, r2)
70 INC (@(NWAITERS,r8),r2)
82 mov.l @(PRIVATE,r8), r5
84 mov.l @(PRIVATE,r8), r5
105 cmp/eq #-EWOULDBLOCK, r0
117 CMPXCHG (r4, @r8, r3, r2)
121 DEC (@(NWAITERS,r8), r2)
128 DEC (@(NWAITERS,r8), r2)
156 .long _GLOBAL_OFFSET_TABLE_
159 .long __errno_location@PLT-(.Lerrloc0b-.)
162 .long __pthread_enable_asynccancel-.Lenable0b
164 .long __pthread_disable_asynccancel-.Ldisable0b
165 .size __new_sem_wait,.-__new_sem_wait
166 versioned_symbol(libpthread, __new_sem_wait, sem_wait, GLIBC_2_1)
169 .type sem_wait_cleanup,@function
171 DEC (@(NWAITERS,r8), r2)
184 .long _Unwind_Resume@GOTOFF
189 .size sem_wait_cleanup,.-sem_wait_cleanup
192 .section .gcc_except_table,"a",@progbits
194 .byte 0xff ! @LPStart format (omit)
195 .byte 0xff ! @TType format (omit)
196 .byte 0x01 ! call-site format
198 .uleb128 .Lcstend-.Lcstbegin
200 .uleb128 .LcleanupSTART-.LSTARTCODE
201 .uleb128 .LcleanupEND-.LcleanupSTART
202 .uleb128 sem_wait_cleanup-.LSTARTCODE
204 .uleb128 .LcallUR-.LSTARTCODE
205 .uleb128 .LENDCODE-.LcallUR
211 .section .eh_frame,"a",@progbits
213 .ualong .LENDCIE-.LSTARTCIE ! Length of the CIE.
216 .byte 1 ! Version number.
218 .string "zPLR" ! NUL-terminated augmentation
221 .string "zPL" ! NUL-terminated augmentation
224 .uleb128 1 ! Code alignment factor.
225 .sleb128 -4 ! Data alignment factor.
226 .byte 0x11 ! Return address register
229 .uleb128 7 ! Augmentation value length.
230 .byte 0x9b ! Personality: DW_EH_PE_pcrel
232 ! + DW_EH_PE_indirect
233 .ualong DW.ref.__gcc_personality_v0-.
234 .byte 0x1b ! LSDA Encoding: DW_EH_PE_pcrel
236 .byte 0x1b ! FDE Encoding: DW_EH_PE_pcrel
239 .uleb128 6 ! Augmentation value length.
240 .byte 0x0 ! Personality: absolute
241 .ualong __gcc_personality_v0
242 .byte 0x0 ! LSDA Encoding: absolute
244 .byte 0x0c ! DW_CFA_def_cfa
250 .ualong .LENDFDE-.LSTARTFDE ! Length of the FDE.
252 .ualong .LSTARTFDE-.LSTARTFRAME ! CIE pointer.
254 .ualong .LSTARTCODE-. ! PC-relative start address
257 .ualong .LSTARTCODE ! Start address of the code.
259 .ualong .LENDCODE-.LSTARTCODE ! Length of the code.
260 .uleb128 4 ! Augmentation size
262 .ualong .LexceptSTART-.
264 .ualong .LexceptSTART
267 .byte 4 ! DW_CFA_advance_loc4
268 .ualong .Lpush_r8-.LSTARTCODE
269 .byte 14 ! DW_CFA_def_cfa_offset
271 .byte 0x88 ! DW_CFA_offset r8
273 .byte 4 ! DW_CFA_advance_loc4
274 .ualong .Lpush_r10-.Lpush_r8
275 .byte 14 ! DW_CFA_def_cfa_offset
277 .byte 0x8a ! DW_CFA_offset r10
279 .byte 4 ! DW_CFA_advance_loc4
280 .ualong .Lpush_r12-.Lpush_r10
281 .byte 14 ! DW_CFA_def_cfa_offset
283 .byte 0x8c ! DW_CFA_offset r12
285 .byte 4 ! DW_CFA_advance_loc4
286 .ualong .Lpush_pr-.Lpush_r12
287 .byte 14 ! DW_CFA_def_cfa_offset
289 .byte 0x91 ! DW_CFA_offset pr
296 .hidden DW.ref.__gcc_personality_v0
297 .weak DW.ref.__gcc_personality_v0
298 .section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
300 .type DW.ref.__gcc_personality_v0, @object
301 .size DW.ref.__gcc_personality_v0, 4
302 DW.ref.__gcc_personality_v0:
303 .long __gcc_personality_v0