This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][SH] SH CFI directives patch, revised


Hi Thomas, and Kaz,

Here's an updated set of patches for SH CFI annotations, asides from the
parts already committed by Thomas (the CFI modifications for
cancellation point routines).

On the specific issues discussed in the last round:

1) Post-delay slot CFI has been deleted. For some routines where we can
reorder to fill the delay slot with another instruction, I have pulled
the frame-restore to above rts, where it should be less controversial.
For those routines with no such instruction, I just ommitted the CFI.

2) The caller-save CFI in
nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h hasn't been clarified,
so I left that part out for now.

3) The SYSCALL_ERROR_HANDLER macro in
sysdeps/unix/sysv/linux/sh/sysdep.h has been changed to use CFI
directives to mark r12's save/restore.  The RTLD_PRIVATE_ERRNO version
is not dealt with, because simply, r12 there is never saved.

The rest should be pretty straightforward.

Thanks,
Chung-Lin

2012-05-17  Chung-Lin Tang  <cltang@codesourcery.com>

	* sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S
	(__swapcontext): Add CFI directives for epilogue.
	* sysdeps/unix/sysv/linux/sh/sh3/setcontext.S
	(__setcontext): Likewise.
	* sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S
	(__swapcontext): Likewise.
	* sysdeps/unix/sysv/linux/sh/sh4/setcontext.S
	(__setcontext): Likewise.
	* sysdeps/sh/_mcount.S (_mount): Likewise.
	* sysdeps/unix/sh/sysdep.S (__syscall_error): Likewise.
	* sysdeps/unix/sysv/linux/sh/sysdep.h (SYSCALL_ERROR_HANDLER):
	Add CFI directives for r12 register.

	* nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
	(__lll_robust_lock_wait): Add CFI directives for epilogue.
	(__lll_robust_timedlock_wait): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
	(__lll_lock_wait_private): Likewise.
	(__lll_lock_wait): Likewise.
	(__lll_timedlock_wait): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
	(sem_timedwait): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S
	(__new_sem_wait): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
	(pthread_barrier_wait): Add CFI directives.
	* nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
	(__pthread_cond_broadcast): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
	(_pthread_cond_signal): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
	(__pthread_cond_timedwait): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
	(__pthread_cond_wait): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
	(__pthread_rwlock_unlock): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
	(__pthread_rwlock_wrlock): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
	(__pthread_rwlock_rdlock): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
	(pthread_rwlock_timedwrlock): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
	(pthread_rwlock_timedrdlock): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
	(__new_sem_post): Likewise.
	* nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S
	(__new_sem_trywait): Likewise.





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]