diff options
Diffstat (limited to 'nptl/sysdeps')
16 files changed, 350 insertions, 27 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S index fe4e3b628b..0177209638 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S @@ -165,6 +165,8 @@ __lll_lock_wait_private: bf 1b mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) rts mov r2, r0 cfi_endproc @@ -208,7 +210,11 @@ __lll_lock_wait: bf 1b mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) ret mov r2, r0 cfi_endproc @@ -286,6 +292,7 @@ __lll_timedlock_wait: 5: rts mov.l @r15+, r12 + /* Omit CFI for restore in delay slot. */ # ifndef __ASSUME_FUTEX_CLOCK_REALTIME .align 2 @@ -306,6 +313,8 @@ __lll_timedlock_wait: cmp/hs r0, r1 bt 3f + cfi_remember_state + mov.l r11, @-r15 cfi_adjust_cfa_offset(4) cfi_rel_offset (r11, 0) @@ -386,17 +395,32 @@ __lll_timedlock_wait: 2: mov #ETIMEDOUT, r3 6: - mov r3, r0 add #8, r15 + cfi_adjust_cfa_offset (-8) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) mov.l @r15+, r10 + cfi_adjust_cfa_offset (-4) + cfi_restore (r10) mov.l @r15+, r11 + cfi_adjust_cfa_offset (-4) + cfi_restore (r11) + mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) rts - mov.l @r15+, r12 + mov r3, r0 + + cfi_restore_state 3: mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) rts mov #EINVAL, r0 # endif @@ -521,10 +545,16 @@ __lll_timedwait_tid: 4: mov #0, r0 3: + cfi_remember_state add #8, r15 + cfi_adjust_cfa_offset (-8) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) rts mov.l @r15+, r9 + /* Omit CFI for restore in delay slot. */ + cfi_restore_state 1: /* Check whether the time expired. */ mov #-ETIMEDOUT, r1 diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S b/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S index 8b1e006712..7a192a9cc5 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S @@ -1,5 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005, 2006, 2007 - Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -115,6 +114,8 @@ __lll_robust_lock_wait: 3: mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) ret mov r4, r0 cfi_endproc @@ -231,12 +232,22 @@ __lll_robust_timedlock_wait: mov #0, r0 6: + cfi_remember_state add #8, r15 + cfi_adjust_cfa_offset (-8) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) mov.l @r15+, r10 + cfi_adjust_cfa_offset (-4) + cfi_restore (r10) rts mov.l @r15+, r11 + /* Omit CFI for restore in delay slot. */ + cfi_restore_state 7: /* Check whether the time expired. */ @@ -248,6 +259,12 @@ __lll_robust_timedlock_wait: bra 6b mov #ETIMEDOUT, r0 3: + /* Restore initial state for invalid timeout case. */ + cfi_restore (r8) + cfi_restore (r9) + cfi_restore (r10) + cfi_restore (r11) + cfi_def_cfa_offset (0) rts mov #EINVAL, r0 cfi_endproc diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S index 58a9cdef58..dd32d81dc6 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,10 +25,17 @@ .globl pthread_barrier_wait .type pthread_barrier_wait,@function .align 5 + cfi_startproc pthread_barrier_wait: mov.l r9, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r9, 0) mov.l r8, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r8, 0) sts.l pr, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (pr, 0) mov r4, r8 /* Get the mutex. */ @@ -98,11 +105,19 @@ pthread_barrier_wait: bf 9f 10: - mov #0, r0 /* != PTHREAD_BARRIER_SERIAL_THREAD */ + cfi_remember_state lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) + mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) rts - mov.l @r15+, r9 + mov #0, r0 /* != PTHREAD_BARRIER_SERIAL_THREAD */ + cfi_restore_state 3: /* The necessary number of threads arrived. */ @@ -140,11 +155,19 @@ pthread_barrier_wait: tst r2, r2 bf 4f 5: - mov #-1, r0 /* == PTHREAD_BARRIER_SERIAL_THREAD */ + cfi_remember_state lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) + mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) rts - mov.l @r15+, r9 + mov #-1, r0 /* == PTHREAD_BARRIER_SERIAL_THREAD */ + cfi_restore_state 1: mov.l @(PRIVATE,r8), r6 @@ -200,6 +223,7 @@ pthread_barrier_wait: .Lwake2b: bra 10b mov r9, r6 + cfi_endproc .align 2 .Lall: diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S index 7bd93553d3..fc1791b51f 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -30,11 +30,20 @@ .globl __pthread_cond_broadcast .type __pthread_cond_broadcast, @function .align 5 + cfi_startproc __pthread_cond_broadcast: mov.l r10, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r10, 0) mov.l r9, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r9, 0) mov.l r8, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r8, 0) sts.l pr, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (pr, 0) mov r4, r8 /* Get internal lock. */ @@ -136,12 +145,22 @@ __pthread_cond_broadcast: add #cond_futex, r4 10: - mov #0, r0 + cfi_remember_state lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) + mov.l @r15+, r10 + cfi_adjust_cfa_offset (-4) + cfi_restore (r10) rts - mov.l @r15+, r10 + mov #0, r0 + cfi_restore_state 4: /* Unlock. */ @@ -153,12 +172,22 @@ __pthread_cond_broadcast: tst r2, r2 bf 5f 6: - mov #0, r0 + cfi_remember_state lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) + mov.l @r15+, r10 + cfi_adjust_cfa_offset (-4) + cfi_restore (r10) rts - mov.l @r15+, r10 + mov #0, r0 + cfi_restore_state 1: /* Initial locking failed. */ @@ -244,6 +273,7 @@ __pthread_cond_broadcast: SYSCALL_INST_PAD bra 10b nop + cfi_endproc #ifndef __ASSUME_PRIVATE_FUTEX .Lpfoff: diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S index 320a3e8f05..71a8e57506 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,9 +29,14 @@ .globl __pthread_cond_signal .type __pthread_cond_signal, @function .align 5 + cfi_startproc __pthread_cond_signal: mov.l r8, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r8, 0) sts.l pr, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (pr, 0) mov r4, r8 /* Get internal lock. */ @@ -109,10 +114,16 @@ __pthread_cond_signal: bt 7f 6: - mov #0, r0 + cfi_remember_state lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) + mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) rts - mov.l @r15+, r8 + mov #0, r0 + cfi_restore_state #ifndef __ASSUME_PRIVATE_FUTEX .Lpfoff: @@ -178,6 +189,7 @@ __pthread_cond_signal: .Lwait4b: bra 2b nop + cfi_endproc .align 2 .Lwait4: diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S index d945dbf2c6..0937d6c237 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -416,15 +416,31 @@ __pthread_cond_timedwait: mov.l @(24,r15), r0 18: + cfi_remember_state add #64, r15 + cfi_adjust_cfa_offset (-64) lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r13 + cfi_adjust_cfa_offset (-4) + cfi_restore (r13) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) mov.l @r15+, r11 + cfi_adjust_cfa_offset (-4) + cfi_restore (r11) mov.l @r15+, r10 + cfi_adjust_cfa_offset (-4) + cfi_restore (r10) mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) rts mov.l @r15+, r8 + /* Omit CFI for restore in delay slot. */ + cfi_restore_state #ifndef __ASSUME_PRIVATE_FUTEX .Lpfoff: diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S index d06673cd84..4588c6f083 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -285,14 +285,28 @@ __pthread_cond_wait: /* We return the result of the mutex_lock operation. */ 14: + cfi_remember_state add #48, r15 + cfi_adjust_cfa_offset (-48) lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) mov.l @r15+, r11 + cfi_adjust_cfa_offset (-4) + cfi_restore (r11) mov.l @r15+, r10 + cfi_adjust_cfa_offset (-4) + cfi_restore (r10) mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) rts mov.l @r15+, r8 + /* Omit CFI for restore in delay slot. */ + cfi_restore_state #ifndef __ASSUME_PRIVATE_FUTEX .Lpfoff0: diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S index ee88089527..8d261bc7b8 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,11 +29,20 @@ .globl __pthread_rwlock_rdlock .type __pthread_rwlock_rdlock,@function .align 5 + cfi_startproc __pthread_rwlock_rdlock: mov.l r12, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r12, 0) mov.l r9, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r9, 0) mov.l r8, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r8, 0) sts.l pr, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (pr, 0) mov r4, r8 /* Get the lock. */ @@ -134,12 +143,22 @@ __pthread_rwlock_rdlock: tst r2, r2 bf 6f 7: + cfi_remember_state lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) rts mov r3, r0 + cfi_restore_state #ifndef __ASSUME_PRIVATE_FUTEX .Lpfoff: @@ -234,6 +253,7 @@ __pthread_rwlock_rdlock: .Lwait1b: bra 13b nop + cfi_endproc .align 2 .Lwait0: diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S index a7c524d414..4a3dbb35fb 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,13 +29,25 @@ .globl pthread_rwlock_timedrdlock .type pthread_rwlock_timedrdlock,@function .align 5 + cfi_startproc pthread_rwlock_timedrdlock: mov.l r12, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r12, 0) mov.l r10, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r10, 0) mov.l r9, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r9, 0) mov.l r8, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r8, 0) sts.l pr, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (pr, 0) add #-8, r15 + cfi_adjust_cfa_offset (8) mov r4, r8 mov r5, r9 @@ -183,14 +195,27 @@ pthread_rwlock_timedrdlock: tst r2, r2 bf 6f 7: + cfi_remember_state add #8,r15 + cfi_adjust_cfa_offset (-8) lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) mov.l @r15+, r10 + cfi_adjust_cfa_offset (-4) + cfi_restore (r10) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) rts mov r3, r0 + cfi_restore_state #ifndef __ASSUME_PRIVATE_FUTEX .Lpfoff: @@ -300,6 +325,7 @@ pthread_rwlock_timedrdlock: 19: bra 9b mov #EINVAL, r3 + cfi_endproc .align 2 .Lwait2: diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S index 04e2c63f1e..89741e3df3 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,13 +29,25 @@ .globl pthread_rwlock_timedwrlock .type pthread_rwlock_timedwrlock,@function .align 5 + cfi_startproc pthread_rwlock_timedwrlock: mov.l r12, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r12, 0) mov.l r10, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r10, 0) mov.l r9, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r9, 0) mov.l r8, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r8, 0) sts.l pr, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (pr, 0) add #-8, r15 + cfi_adjust_cfa_offset (8) mov r4, r8 mov r5, r9 @@ -181,14 +193,27 @@ pthread_rwlock_timedwrlock: tst r2, r2 bf 6f 7: + cfi_remember_state add #8,r15 + cfi_adjust_cfa_offset (-8) lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) mov.l @r15+, r10 + cfi_adjust_cfa_offset (-4) + cfi_restore (r10) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) rts mov r3, r0 + cfi_restore_state #ifndef __ASSUME_PRIVATE_FUTEX .Lpfoff: @@ -284,6 +309,7 @@ pthread_rwlock_timedwrlock: 16: bra 17b mov #-ETIMEDOUT, r3 + cfi_endproc .align 2 .Lwait6: diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S index bd0b08a73a..0ffbe577db 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,10 +27,17 @@ .globl __pthread_rwlock_unlock .type __pthread_rwlock_unlock,@function .align 5 + cfi_startproc __pthread_rwlock_unlock: mov.l r12, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r12, 0) mov.l r8, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r8, 0) sts.l pr, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (pr, 0) mov r4, r8 /* Get the lock. */ @@ -108,11 +115,19 @@ __pthread_rwlock_unlock: trapa #0x14 SYSCALL_INST_PAD + cfi_remember_state lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) rts mov #0, r0 + cfi_restore_state 6: #if MUTEX == 0 DEC (@r8, r2) @@ -122,11 +137,19 @@ __pthread_rwlock_unlock: tst r2, r2 bf 3f 4: + cfi_remember_state lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) rts mov #0, r0 + cfi_restore_state 1: mov r8, r5 @@ -159,7 +182,9 @@ __pthread_rwlock_unlock: 7: mov.l r4, @-r15 + cfi_adjust_cfa_offset (4) mov.l r6, @-r15 + cfi_adjust_cfa_offset (4) mov r8, r4 #if MUTEX != 0 add #MUTEX, r4 @@ -173,9 +198,12 @@ __pthread_rwlock_unlock: .Lwake9b: mov.l @r15+, r6 + cfi_adjust_cfa_offset (-4) bra 8b mov.l @r15+, r4 + cfi_endproc + #ifndef __ASSUME_PRIVATE_FUTEX .Lpfoff: .word PRIVATE_FUTEX - TLS_PRE_TCB_SIZE diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S index b378df6abd..febdaa1d79 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,11 +29,20 @@ .globl __pthread_rwlock_wrlock .type __pthread_rwlock_wrlock,@function .align 5 + cfi_startproc __pthread_rwlock_wrlock: mov.l r12, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r12, 0) mov.l r9, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r9, 0) mov.l r8, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r8, 0) sts.l pr, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (pr, 0) mov r4, r8 /* Get the lock. */ @@ -128,12 +137,22 @@ __pthread_rwlock_wrlock: tst r2, r2 bf 6f 7: + cfi_remember_state lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) rts mov r3, r0 + cfi_restore_state 1: mov r8, r5 @@ -217,6 +236,8 @@ __pthread_rwlock_wrlock: bra 13b nop + cfi_endproc + .align 2 .Lwait4: .long __lll_lock_wait-.Lwait4b diff --git a/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S b/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S index b228a325fe..662271c5fa 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2007, 2008, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -28,6 +28,7 @@ .globl __new_sem_post .type __new_sem_post,@function .align 5 + cfi_startproc __new_sem_post: mov.l @(VALUE,r4), r2 0: @@ -66,8 +67,14 @@ __new_sem_post: mov #EOVERFLOW, r2 4: mov.l r12, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r12, 0) mov.l r8, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r8, 0) sts.l pr, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (pr, 0) mova .Lgot3, r0 mov.l .Lgot3, r12 add r0, r12 @@ -83,10 +90,17 @@ __new_sem_post: .Lexit: mov.l r2, @r0 lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) rts mov #-1, r0 + cfi_endproc .align 2 .Lmax: diff --git a/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S index 9553bc7ba1..f8f9de5abd 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S @@ -170,14 +170,27 @@ sem_timedwait: mov #0, r0 10: + cfi_remember_state add #8, r15 + cfi_adjust_cfa_offset (-8) lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) mov.l @r15+, r10 + cfi_adjust_cfa_offset (-4) + cfi_restore (r10) mov.l @r15+, r9 + cfi_adjust_cfa_offset (-4) + cfi_restore (r9) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) rts nop + cfi_restore_state 3: neg r0, r0 diff --git a/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S b/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S index 35ae9b213d..2c5d3f589b 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2007, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,10 +27,17 @@ .globl __new_sem_trywait .type __new_sem_trywait,@function .align 5 + cfi_startproc __new_sem_trywait: mov.l r12, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r12, 0) mov.l r8, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (r8, 0) sts.l pr, @-r15 + cfi_adjust_cfa_offset (4) + cfi_rel_offset (pr, 0) mov r4, r8 mov.l @r8, r0 2: @@ -44,11 +51,19 @@ __new_sem_trywait: bf/s 2b mov r2, r0 + cfi_remember_state lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) rts mov #0, r0 + cfi_restore_state 1: mov #EAGAIN, r8 @@ -67,11 +82,19 @@ __new_sem_trywait: .Lexit: mov.l r8, @r0 lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r8 + cfi_adjust_cfa_offset (-4) + cfi_restore (r8) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) rts mov #-1, r0 + cfi_endproc + .align 2 .Lgot1: .long _GLOBAL_OFFSET_TABLE_ diff --git a/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S b/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S index f2dd0c8bf7..57af34473d 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2007, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -71,11 +71,20 @@ __new_sem_wait: 7: mov #0, r0 9: + cfi_remember_state lds.l @r15+, pr + cfi_adjust_cfa_offset (-4) + cfi_restore (pr) mov.l @r15+, r12 + cfi_adjust_cfa_offset (-4) + cfi_restore (r12) mov.l @r15+, r10 + cfi_adjust_cfa_offset (-4) + cfi_restore (r10) rts mov.l @r15+, r8 + /* Omit CFI for restore in delay slot. */ + cfi_restore_state .Lafter_ret: 1: |