1 /* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 #include <pthread-errnos.h>
22 #include <structsem.h>
23 #include <lowlevellock.h>
27 # error "code needs to be rewritten for VALUE != 0"
33 .type __new_sem_wait,@function
67 6: call __pthread_enable_asynccancel
71 movl PRIVATE(%ebx), %ecx
73 movl $FUTEX_WAIT, %ecx
74 orl PRIVATE(%ebx), %ecx
83 call __pthread_disable_asynccancel
88 cmpl $-EWOULDBLOCK, %esi
110 call __x86.get_pc_thunk.bx
115 addl $_GLOBAL_OFFSET_TABLE_, %ebx
117 # ifdef NO_TLS_DIRECT_SEG_REFS
118 movl errno@gotntpoff(%ebx), %edx
122 movl errno@gotntpoff(%ebx), %edx
123 movl %esi, %gs:(%edx)
126 call __errno_location@plt
132 .size __new_sem_wait,.-__new_sem_wait
133 weak_alias(__new_sem_wait, sem_wait)
136 .type sem_wait_cleanup,@function
142 call _Unwind_Resume@PLT
145 .size sem_wait_cleanup,.-sem_wait_cleanup
148 .section .gcc_except_table,"a",@progbits
150 .byte 0xff # @LPStart format (omit)
151 .byte 0xff # @TType format (omit)
152 .byte 0x01 # call-site format
154 .uleb128 .Lcstend-.Lcstbegin
156 .uleb128 .LcleanupSTART-.LSTARTCODE
157 .uleb128 .LcleanupEND-.LcleanupSTART
158 .uleb128 sem_wait_cleanup-.LSTARTCODE
160 .uleb128 .LcallUR-.LSTARTCODE
161 .uleb128 .LENDCODE-.LcallUR
167 .section .eh_frame,"a",@progbits
169 .long .LENDCIE-.LSTARTCIE # Length of the CIE.
172 .byte 1 # Version number.
174 .string "zPLR" # NUL-terminated augmentation
177 .string "zPL" # NUL-terminated augmentation
180 .uleb128 1 # Code alignment factor.
181 .sleb128 -4 # Data alignment factor.
182 .byte 8 # Return address register
185 .uleb128 7 # Augmentation value length.
186 .byte 0x9b # Personality: DW_EH_PE_pcrel
188 # + DW_EH_PE_indirect
189 .long DW.ref.__gcc_personality_v0-.
190 .byte 0x1b # LSDA Encoding: DW_EH_PE_pcrel
192 .byte 0x1b # FDE Encoding: DW_EH_PE_pcrel
195 .uleb128 6 # Augmentation value length.
196 .byte 0x0 # Personality: absolute
197 .long __gcc_personality_v0
198 .byte 0x0 # LSDA Encoding: absolute
200 .byte 0x0c # DW_CFA_def_cfa
203 .byte 0x88 # DW_CFA_offset, column 0x10
208 .long .LENDFDE-.LSTARTFDE # Length of the FDE.
210 .long .LSTARTFDE-.LSTARTFRAME # CIE pointer.
212 .long .LSTARTCODE-. # PC-relative start address
215 .long .LSTARTCODE # Start address of the code.
217 .long .LENDCODE-.LSTARTCODE # Length of the code.
218 .uleb128 4 # Augmentation size
220 .long .LexceptSTART-.
225 .byte 4 # DW_CFA_advance_loc4
226 .long .Lpush_ebx-.LSTARTCODE
227 .byte 14 # DW_CFA_def_cfa_offset
229 .byte 0x83 # DW_CFA_offset %ebx
231 .byte 4 # DW_CFA_advance_loc4
232 .long .Lpush_esi-.Lpush_ebx
233 .byte 14 # DW_CFA_def_cfa_offset
235 .byte 0x86 # DW_CFA_offset %esi
237 .byte 4 # DW_CFA_advance_loc4
238 .long .Lsub_esp-.Lpush_esi
239 .byte 14 # DW_CFA_def_cfa_offset
241 .byte 4 # DW_CFA_advance_loc4
242 .long .Ladd_esp-.Lsub_esp
243 .byte 14 # DW_CFA_def_cfa_offset
245 .byte 0xc3 # DW_CFA_restore %ebx
246 .byte 0xc6 # DW_CFA_restore %esi
247 .byte 4 # DW_CFA_advance_loc4
248 .long .Lafter_ret-.Ladd_esp
249 .byte 14 # DW_CFA_def_cfa_offset
251 .byte 0x83 # DW_CFA_offset %ebx
253 .byte 0x86 # DW_CFA_offset %esi
260 .hidden DW.ref.__gcc_personality_v0
261 .weak DW.ref.__gcc_personality_v0
262 .section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
264 .type DW.ref.__gcc_personality_v0, @object
265 .size DW.ref.__gcc_personality_v0, 4
266 DW.ref.__gcc_personality_v0:
267 .long __gcc_personality_v0