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, see
16 <http://www.gnu.org/licenses/>. */
19 #include <pthread-errnos.h>
20 #include <tcb-offsets.h>
21 #include <structsem.h>
22 #include <lowlevellock.h>
23 #include "lowlevel-atomic.h"
27 # error "code needs to be rewritten for VALUE != 0"
33 .type sem_wait,@function
54 CMPXCHG (r4, @r8, r3, r2)
68 INC (@(NWAITERS,r8),r2)
80 mov.l @(PRIVATE,r8), r5
82 mov.l @(PRIVATE,r8), r5
103 cmp/eq #-EWOULDBLOCK, r0
115 CMPXCHG (r4, @r8, r3, r2)
119 DEC (@(NWAITERS,r8), r2)
126 DEC (@(NWAITERS,r8), r2)
154 .long _GLOBAL_OFFSET_TABLE_
157 .long __errno_location@PLT-(.Lerrloc0b-.)
160 .long __pthread_enable_asynccancel-.Lenable0b
162 .long __pthread_disable_asynccancel-.Ldisable0b
163 .size sem_wait,.-sem_wait
166 .type sem_wait_cleanup,@function
168 DEC (@(NWAITERS,r8), r2)
181 .long _Unwind_Resume@GOTOFF
186 .size sem_wait_cleanup,.-sem_wait_cleanup
189 .section .gcc_except_table,"a",@progbits
191 .byte 0xff ! @LPStart format (omit)
192 .byte 0xff ! @TType format (omit)
193 .byte 0x01 ! call-site format
195 .uleb128 .Lcstend-.Lcstbegin
197 .uleb128 .LcleanupSTART-.LSTARTCODE
198 .uleb128 .LcleanupEND-.LcleanupSTART
199 .uleb128 sem_wait_cleanup-.LSTARTCODE
201 .uleb128 .LcallUR-.LSTARTCODE
202 .uleb128 .LENDCODE-.LcallUR
208 .section .eh_frame,"a",@progbits
210 .ualong .LENDCIE-.LSTARTCIE ! Length of the CIE.
213 .byte 1 ! Version number.
215 .string "zPLR" ! NUL-terminated augmentation
218 .string "zPL" ! NUL-terminated augmentation
221 .uleb128 1 ! Code alignment factor.
222 .sleb128 -4 ! Data alignment factor.
223 .byte 0x11 ! Return address register
226 .uleb128 7 ! Augmentation value length.
227 .byte 0x9b ! Personality: DW_EH_PE_pcrel
229 ! + DW_EH_PE_indirect
230 .ualong DW.ref.__gcc_personality_v0-.
231 .byte 0x1b ! LSDA Encoding: DW_EH_PE_pcrel
233 .byte 0x1b ! FDE Encoding: DW_EH_PE_pcrel
236 .uleb128 6 ! Augmentation value length.
237 .byte 0x0 ! Personality: absolute
238 .ualong __gcc_personality_v0
239 .byte 0x0 ! LSDA Encoding: absolute
241 .byte 0x0c ! DW_CFA_def_cfa
247 .ualong .LENDFDE-.LSTARTFDE ! Length of the FDE.
249 .ualong .LSTARTFDE-.LSTARTFRAME ! CIE pointer.
251 .ualong .LSTARTCODE-. ! PC-relative start address
254 .ualong .LSTARTCODE ! Start address of the code.
256 .ualong .LENDCODE-.LSTARTCODE ! Length of the code.
257 .uleb128 4 ! Augmentation size
259 .ualong .LexceptSTART-.
261 .ualong .LexceptSTART
264 .byte 4 ! DW_CFA_advance_loc4
265 .ualong .Lpush_r8-.LSTARTCODE
266 .byte 14 ! DW_CFA_def_cfa_offset
268 .byte 0x88 ! DW_CFA_offset r8
270 .byte 4 ! DW_CFA_advance_loc4
271 .ualong .Lpush_r10-.Lpush_r8
272 .byte 14 ! DW_CFA_def_cfa_offset
274 .byte 0x8a ! DW_CFA_offset r10
276 .byte 4 ! DW_CFA_advance_loc4
277 .ualong .Lpush_r12-.Lpush_r10
278 .byte 14 ! DW_CFA_def_cfa_offset
280 .byte 0x8c ! DW_CFA_offset r12
282 .byte 4 ! DW_CFA_advance_loc4
283 .ualong .Lpush_pr-.Lpush_r12
284 .byte 14 ! DW_CFA_def_cfa_offset
286 .byte 0x91 ! DW_CFA_offset pr
293 .hidden DW.ref.__gcc_personality_v0
294 .weak DW.ref.__gcc_personality_v0
295 .section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
297 .type DW.ref.__gcc_personality_v0, @object
298 .size DW.ref.__gcc_personality_v0, 4
299 DW.ref.__gcc_personality_v0:
300 .long __gcc_personality_v0