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]

Re: [RFC PATCH] Add cfi directives to pthread_rwlock_timed{rd,wr}lock


Resend with problems corrected 
(nptl has its own ChangeLog, patch was base64 encoded instead of inline).

-- 
Paul Pluzhnikov

2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
	Add cfi directives.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: 
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
	Likewise.


Index: nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
===================================================================
RCS file: /cvs/glibc/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S,v
retrieving revision 1.17
diff -u -p -u -r1.17 pthread_rwlock_timedrdlock.S
--- nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S	11 May 2008 05:40:33 -0000	1.17
+++ nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S	22 May 2008 18:19:56 -0000
@@ -30,11 +30,21 @@
 	.type	pthread_rwlock_timedrdlock,@function
 	.align	16
 pthread_rwlock_timedrdlock:
+	cfi_startproc
 	pushl	%esi
+	cfi_adjust_cfa_offset(4)
 	pushl	%edi
+	cfi_adjust_cfa_offset(4)
 	pushl	%ebx
+	cfi_adjust_cfa_offset(4)
 	pushl	%ebp
+	cfi_adjust_cfa_offset(4)
+	cfi_offset(%esi, -8)
+	cfi_offset(%edi, -12)
+	cfi_offset(%ebx, -16)
+	cfi_offset(%ebp, -20)
 	subl	$8, %esp
+	cfi_adjust_cfa_offset(8)
 
 	movl	28(%esp), %ebp
 	movl	32(%esp), %edi
@@ -150,12 +160,26 @@ pthread_rwlock_timedrdlock:
 7:	movl	%edx, %eax
 
 	addl	$8, %esp
+	cfi_adjust_cfa_offset(-8)
 	popl	%ebp
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%ebp)
 	popl	%ebx
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%ebx)
 	popl	%edi
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%edi)
 	popl	%esi
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%esi)
 	ret
 
+	cfi_adjust_cfa_offset(24)
+	cfi_offset(%esi, -8)
+	cfi_offset(%edi, -12)
+	cfi_offset(%ebx, -16)
+	cfi_offset(%ebp, -20)
 1:
 #if MUTEX == 0
 	movl	%ebp, %edx
@@ -216,4 +240,5 @@ pthread_rwlock_timedrdlock:
 
 19:	movl	$EINVAL, %edx
 	jmp	9b
+	cfi_endproc
 	.size	pthread_rwlock_timedrdlock,.-pthread_rwlock_timedrdlock
Index: nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
===================================================================
RCS file: /cvs/glibc/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S,v
retrieving revision 1.18
diff -u -p -u -r1.18 pthread_rwlock_timedwrlock.S
--- nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S	11 May 2008 05:40:33 -0000	1.18
+++ nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S	22 May 2008 18:19:56 -0000
@@ -30,11 +30,21 @@
 	.type	pthread_rwlock_timedwrlock,@function
 	.align	16
 pthread_rwlock_timedwrlock:
+	cfi_startproc
 	pushl	%esi
+	cfi_adjust_cfa_offset(4)
 	pushl	%edi
+	cfi_adjust_cfa_offset(4)
 	pushl	%ebx
+	cfi_adjust_cfa_offset(4)
 	pushl	%ebp
+	cfi_adjust_cfa_offset(4)
+	cfi_offset(%esi, -8)
+	cfi_offset(%edi, -12)
+	cfi_offset(%ebx, -16)
+	cfi_offset(%ebp, -20)
 	subl	$8, %esp
+	cfi_adjust_cfa_offset(8)
 
 	movl	28(%esp), %ebp
 	movl	32(%esp), %edi
@@ -148,12 +158,26 @@ pthread_rwlock_timedwrlock:
 7:	movl	%edx, %eax
 
 	addl	$8, %esp
+	cfi_adjust_cfa_offset(-8)
 	popl	%ebp
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%ebp)
 	popl	%ebx
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%ebx)
 	popl	%edi
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%edi)
 	popl	%esi
+	cfi_adjust_cfa_offset(-4)
+	cfi_restore(%esi)
 	ret
 
+	cfi_adjust_cfa_offset(24)
+	cfi_offset(%esi, -8)
+	cfi_offset(%edi, -12)
+	cfi_offset(%ebx, -16)
+	cfi_offset(%ebp, -20)
 1:
 #if MUTEX == 0
 	movl	%ebp, %edx
@@ -209,4 +233,5 @@ pthread_rwlock_timedwrlock:
 
 19:	movl	$EINVAL, %edx
 	jmp	9b
+	cfi_endproc
 	.size	pthread_rwlock_timedwrlock,.-pthread_rwlock_timedwrlock
Index: nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
===================================================================
RCS file: /cvs/glibc/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S,v
retrieving revision 1.14
diff -u -p -u -r1.14 pthread_rwlock_timedrdlock.S
--- nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S	1 Aug 2007 04:35:45 -0000	1.14
+++ nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S	22 May 2008 18:19:56 -0000
@@ -33,10 +33,19 @@
 	.type	pthread_rwlock_timedrdlock,@function
 	.align	16
 pthread_rwlock_timedrdlock:
+	cfi_startproc
 	pushq	%r12
+	cfi_adjust_cfa_offset(8)
 	pushq	%r13
+	cfi_adjust_cfa_offset(8)
 	pushq	%r14
+	cfi_adjust_cfa_offset(8)
+	cfi_offset(%r12, -16)
+	cfi_offset(%r13, -24)
+	cfi_offset(%r14, -32)
+
 	subq	$16, %rsp
+	cfi_adjust_cfa_offset(16)
 
 	movq	%rdi, %r12
 	movq	%rsi, %r13
@@ -155,11 +164,22 @@ pthread_rwlock_timedrdlock:
 7:	movq	%rdx, %rax
 
 	addq	$16, %rsp
+	cfi_adjust_cfa_offset(-16)
 	popq	%r14
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(%r14)
 	popq	%r13
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(%r13)
 	popq	%r12
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(%r12)
 	retq
 
+	cfi_adjust_cfa_offset(40)
+	cfi_offset(%r12, -16)
+	cfi_offset(%r13, -24)
+	cfi_offset(%r14, -32)
 1:	movl	PSHARED(%rdi), %esi
 #if MUTEX != 0
 	addq	$MUTEX, %rdi
@@ -214,4 +234,5 @@ pthread_rwlock_timedrdlock:
 
 19:	movl	$EINVAL, %edx
 	jmp	9b
+	cfi_endproc
 	.size	pthread_rwlock_timedrdlock,.-pthread_rwlock_timedrdlock
Index: nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
===================================================================
RCS file: /cvs/glibc/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S,v
retrieving revision 1.12
diff -u -p -u -r1.12 pthread_rwlock_timedwrlock.S
--- nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S	1 Aug 2007 04:41:38 -0000	1.12
+++ nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S	22 May 2008 18:19:56 -0000
@@ -33,10 +33,19 @@
 	.type	pthread_rwlock_timedwrlock,@function
 	.align	16
 pthread_rwlock_timedwrlock:
+	cfi_startproc
 	pushq	%r12
+	cfi_adjust_cfa_offset(8)
 	pushq	%r13
+	cfi_adjust_cfa_offset(8)
 	pushq	%r14
+	cfi_adjust_cfa_offset(8)
+	cfi_offset(%r12, -16)
+	cfi_offset(%r13, -24)
+	cfi_offset(%r14, -32)
+
 	subq	$16, %rsp
+	cfi_adjust_cfa_offset(16)
 
 	movq	%rdi, %r12
 	movq	%rsi, %r13
@@ -152,11 +161,22 @@ pthread_rwlock_timedwrlock:
 7:	movq	%rdx, %rax
 
 	addq	$16, %rsp
+	cfi_adjust_cfa_offset(-16)
 	popq	%r14
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(%r14)
 	popq	%r13
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(%r13)
 	popq	%r12
+	cfi_adjust_cfa_offset(-8)
+	cfi_restore(%r12)
 	retq
 
+	cfi_adjust_cfa_offset(40)
+	cfi_offset(%r12, -16)
+	cfi_offset(%r13, -24)
+	cfi_offset(%r14, -32)
 1:	movl	PSHARED(%rdi), %esi
 #if MUTEX != 0
 	addq	$MUTEX, %rdi
@@ -206,4 +226,5 @@ pthread_rwlock_timedwrlock:
 
 19:	movl	$EINVAL, %edx
 	jmp	9b
+	cfi_endproc
 	.size	pthread_rwlock_timedwrlock,.-pthread_rwlock_timedwrlock


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