1 /* Copyright (C) 2002, 2003, 2005 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
29 .comm __fork_generation, 4, 4
35 .type __pthread_once,@function
44 /* Preserve the function pointer. */
49 /* Not yet initialized or initialization in progress.
50 Get the fork generation counter now. */
59 orl __fork_generation(%rip), %edx
66 /* Check whether another thread already runs the initializer. */
68 jz 3f /* No -> do it. */
70 /* Check whether the initializer execution was interrupted
73 testl $0xfffffffc, %eax
74 jnz 3f /* Different for generation -> run initializer. */
76 /* Somebody else got here first. Wait. */
80 movl $FUTEX_WAIT, %esi
86 /* Preserve the pointer to the control variable. */
96 /* Get the control variable address back. */
100 /* Sucessful run of the initializer. Signal that we are done. */
107 /* Wake up all other threads. */
108 movl $0x7fffffff, %edx
109 movl $FUTEX_WAKE, %esi
110 movl $SYS_futex, %eax
118 .size __pthread_once,.-__pthread_once
121 .globl __pthread_once_internal
122 __pthread_once_internal = __pthread_once
125 pthread_once = __pthread_once
128 .type clear_once_control,@function
135 movl $0x7fffffff, %edx
136 movl $FUTEX_WAKE, %esi
137 movl $SYS_futex, %eax
142 call _Unwind_Resume@PLT
145 .size clear_once_control,.-clear_once_control
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 clear_once_control-.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 -8 # Data alignment factor.
182 .byte 16 # 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 10 # Augmentation value length.
196 .byte 0x0 # Personality: absolute
197 .quad __gcc_personality_v0
198 .byte 0x0 # LSDA Encoding: absolute
200 .byte 0x0c # DW_CFA_def_cfa
203 .byte 0x90 # 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
214 .long .LENDCODE-.LSTARTCODE # Length of the code.
215 .uleb128 4 # Augmentation size
216 .long .LexceptSTART-.
218 .quad .LSTARTCODE # Start address of the code.
219 .quad .LENDCODE-.LSTARTCODE # Length of the code.
220 .uleb128 8 # Augmentation size
223 .byte 4 # DW_CFA_advance_loc4
224 .long .Lpush_rsi-.LSTARTCODE
225 .byte 14 # DW_CFA_def_cfa_offset
227 .byte 4 # DW_CFA_advance_loc4
228 .long .Lpush_rdi-.Lpush_rsi
229 .byte 14 # DW_CFA_def_cfa_offset
231 .byte 4 # DW_CFA_advance_loc4
232 .long .Lpush_rdi2-.Lpush_rdi
233 .byte 14 # DW_CFA_def_cfa_offset
235 .byte 4 # DW_CFA_advance_loc4
236 .long .Lpop_rdi-.Lpush_rdi2
237 .byte 14 # DW_CFA_def_cfa_offset
239 .byte 4 # DW_CFA_advance_loc4
240 .long .Ladd1-.Lpop_rdi
241 .byte 14 # DW_CFA_def_cfa_offset
243 .byte 4 # DW_CFA_advance_loc4
245 .byte 14 # DW_CFA_def_cfa_offset
247 .byte 4 # DW_CFA_advance_loc4
248 .long clear_once_control-.Ladd2
249 .byte 14 # DW_CFA_def_cfa_offset
252 .byte 4 # DW_CFA_advance_loc4
253 .long .Lpop_rdi3-clear_once_control
254 .byte 14 # DW_CFA_def_cfa_offset
262 .hidden DW.ref.__gcc_personality_v0
263 .weak DW.ref.__gcc_personality_v0
264 .section .gnu.linkonce.d.DW.ref.__gcc_personality_v0,"aw",@progbits
266 .type DW.ref.__gcc_personality_v0, @object
267 .size DW.ref.__gcc_personality_v0, 8
268 DW.ref.__gcc_personality_v0:
269 .quad __gcc_personality_v0