SH: Add CFI directives.

This commit is contained in:
Chung-Lin Tang 2012-05-28 00:06:57 +02:00 committed by Thomas Schwinge
parent 47e452cf7c
commit 65a4de4e06
24 changed files with 420 additions and 33 deletions

View File

@ -1,3 +1,14 @@
2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
* sysdeps/sh/_mcount.S (_mount): Add CFI directives.
* sysdeps/unix/sh/sysdep.S (__syscall_error): Likewise.
* sysdeps/unix/sysv/linux/sh/sh3/setcontext.S (__setcontext): Likewise.
* sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S (__swapcontext):
Likewise.
* sysdeps/unix/sysv/linux/sh/sh4/setcontext.S (__setcontext): Likewise.
* sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S (__swapcontext):
Likewise.
2012-05-27 Ulrich Drepper <drepper@gmail.com>
* po/h.po: Update from translation team.

View File

@ -1,3 +1,36 @@
2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
* sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
(__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
directives.
* sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
(__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
(pthread_barrier_wait): Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
(__pthread_cond_broadcast): Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
(__pthread_cond_signal): Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
(__pthread_cond_timedwait): Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
(__pthread_rwlock_rdlock): Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
(pthread_rwlock_timedrdlock): Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
(pthread_rwlock_timedwrlock): Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
(__pthread_rwlock_unlock): Likewise.
* sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
(__pthread_rwlock_wrlock): Likewise.
* sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
* sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
* sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
Likewise.
* sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
[BZ #12416]

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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_

View File

@ -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:

View File

@ -1,5 +1,5 @@
/* Machine-specific calling sequence for `mcount' profiling function. SuperH
Copyright (C) 2001, 2005 Free Software Foundation, Inc.
Copyright (C) 2001-2012 Free Software Foundation, Inc.
Contributed by NIIBE Yutaka <gniibe@m17n.org>
This file is part of the GNU C Library.
@ -58,11 +58,20 @@ C_LABEL(_mcount)
/* Pop the saved registers. */
lds.l @r15+,pr
cfi_adjust_cfa_offset (-4)
cfi_restore (pr)
mov.l @r15+,r7
cfi_adjust_cfa_offset (-4)
cfi_restore (r7)
mov.l @r15+,r6
cfi_adjust_cfa_offset (-4)
cfi_restore (r6)
mov.l @r15+,r5
cfi_adjust_cfa_offset (-4)
cfi_restore (r5)
rts
mov.l @r15+,r4
/* Omit CFI for restore in delay slot. */
.align 2
#ifdef SHARED

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1999, 2000, 2005 Free Software Foundation, Inc.
/* Copyright (C) 1999-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
@ -41,13 +41,15 @@ skip:
sts.l pr, @-r15
cfi_adjust_cfa_offset (4)
cfi_rel_offset (pr, 0)
jsr @r1
mov.l r0, @-r15
mov.l r0, @-r15
cfi_adjust_cfa_offset (4)
jsr @r1
nop
mov.l @r15+, r1
cfi_adjust_cfa_offset (-4)
lds.l @r15+, pr
cfi_adjust_cfa_offset (-4)
cfi_restore (pr)
mov.l r1, @r0
#endif
#else
@ -77,10 +79,15 @@ skip:
jsr @r1
nop
lds.l @r15+, pr
cfi_adjust_cfa_offset (-4)
cfi_restore (pr)
mov.l @r15+, r1
cfi_adjust_cfa_offset (-4)
mov.l r1, @r0
#endif
mov.l @r15+, r12
cfi_adjust_cfa_offset (-4)
cfi_restore (r12)
#endif
/* And just kick back a -1. */
rts

View File

@ -1,5 +1,5 @@
/* Install given context.
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005-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
@ -90,6 +90,7 @@ ENTRY(__setcontext)
mov.l @(oR7,r0), r7
mov.l @(oR8,r0), r8
mov.l @r15+, r0
cfi_adjust_cfa_offset(-4)
jmp @r0
mov.l @r15+, r0

View File

@ -1,5 +1,5 @@
/* Save current context and install the given one.
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005-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
@ -123,6 +123,7 @@ ENTRY(__swapcontext)
mov.l @(oR7,r0), r7
mov.l @(oR8,r0), r8
mov.l @r15+, r0
cfi_adjust_cfa_offset(-4)
jmp @r0
mov.l @r15+, r0

View File

@ -132,6 +132,7 @@ ENTRY(__setcontext)
mov.l @(oR7,r0), r7
mov.l @(oR8,r0), r8
mov.l @r15+, r0
cfi_adjust_cfa_offset(-4)
jmp @r0
mov.l @r15+, r0

View File

@ -209,6 +209,7 @@ ENTRY(__swapcontext)
mov.l @(oR7,r0), r7
mov.l @(oR8,r0), r8
mov.l @r15+, r0
cfi_adjust_cfa_offset(-4)
jmp @r0
mov.l @r15+, r0