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] S/390: Add even more cfi to asm files


Hi,

the first patch lacks cfi for the other call saved registers.

This patch obsoletes:
http://sources.redhat.com/ml/libc-alpha/2009-12/msg00003.html

Tested on s390 and s390x. No regressions.

Ok?

Bye,

-Andreas-



2009-12-03  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* sysdeps/s390/s390-64/dl-trampoline.S: Add CFI for the call saved
	registers.	
	* sysdeps/s390/s390-32/dl-trampoline.S: Likewise.
	* sysdeps/s390/s390-32/s390-mcount.S: Add CFI.
	* sysdeps/s390/s390-64/s390x-mcount.S: Add CFI.


Index: sysdeps/s390/s390-64/dl-trampoline.S
===================================================================
--- sysdeps/s390/s390-64/dl-trampoline.S.orig	2009-12-02 17:03:13.000000000 +0100
+++ sysdeps/s390/s390-64/dl-trampoline.S	2009-12-03 12:34:20.000000000 +0100
@@ -42,6 +42,7 @@
 _dl_runtime_resolve:
 	stmg   2,5,64(15)	# save registers
 	stg    14,96(15)
+	cfi_offset (r14, -64)
 	lgr    0,15		# create stack frame
 	aghi   15,-160
 	cfi_adjust_cfa_offset (160)
@@ -65,13 +66,20 @@ _dl_runtime_resolve:
 	.align 16
 _dl_runtime_profile:
 	stmg   %r2,%r6,64(%r15)		# save registers
+	cfi_offset (r6, -96)
 	std    %f0,104(%r15)
+	cfi_offset (f0, -56)
 	std    %f2,112(%r15)
+	cfi_offset (f2, -48)
 	std    %f4,120(%r15)
+	cfi_offset (f4, -40)
 	std    %f6,128(%r15)
+	cfi_offset (f6, -32)
 	stg    %r6,16(%r15)
 	stg    %r12,24(%r15)
+	cfi_offset (r12, -136)
 	stg    %r14,32(%r15)
+	cfi_offset (r14, -128)
 	lgr    %r12,%r15		# create stack frame
 	cfi_def_cfa_register (12)
 	aghi   %r15,-160
Index: sysdeps/s390/s390-32/dl-trampoline.S
===================================================================
--- sysdeps/s390/s390-32/dl-trampoline.S.orig	2009-12-02 17:03:13.000000000 +0100
+++ sysdeps/s390/s390-32/dl-trampoline.S	2009-12-03 12:36:13.000000000 +0100
@@ -45,6 +45,7 @@
 _dl_runtime_resolve:
 	stm    %r2,%r5,32(%r15)		# save registers
 	st     %r14,8(%r15)
+	cfi_offset (r14, -88)
 	lr     %r0,%r15			# create stack frame
 	ahi    %r15,-96
 	cfi_adjust_cfa_offset (96)
@@ -71,11 +72,16 @@ _dl_runtime_resolve:
 	.align 16
 _dl_runtime_profile:
 	stm    %r2,%r6,32(%r15)		# save registers
+	cfi_offset (r6, -64)
 	std    %f0,56(%r15)
+	cfi_offset (f0, -40)
 	std    %f2,64(%r15)
+	cfi_offset (f2, -32)
 	st     %r6,8(%r15)
 	st     %r12,12(%r15)
+	cfi_offset (r12, -84)
 	st     %r14,16(%r15)
+	cfi_offset (r14, -80)
 	lr     %r12,%r15		# create stack frame
 	cfi_def_cfa_register (12)
 	ahi    %r15,-96
Index: sysdeps/s390/s390-32/s390-mcount.S
===================================================================
--- sysdeps/s390/s390-32/s390-mcount.S.orig	2009-12-02 17:03:13.000000000 +0100
+++ sysdeps/s390/s390-32/s390-mcount.S	2009-12-02 17:11:20.000000000 +0100
@@ -50,11 +50,14 @@
 
 	ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(_mcount)
 	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function)
+	cfi_startproc
 	.align ALIGNARG(4)
 C_LABEL(_mcount)
 	/* Save the caller-clobbered registers.  */
 	ahi   %r15,-128
+	cfi_adjust_cfa_offset (128)
 	stm   %r14,%r5,96(%r15)
+	cfi_offset (r14, 0)
 	l     %r2,132(%r15)       # callers address  = first parameter
 	la    %r2,0(%r2)          # clear bit 0
 	la    %r3,0(%r14)         # callees address  = second parameter
@@ -77,7 +80,9 @@ C_LABEL(_mcount)
 	 */
 	lm    %r14,%r5,96(%r15)
 	ahi   %r15,128
+	cfi_adjust_cfa_offset (-128)
 	br    %r14
+	cfi_endproc
 	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(_mcount))
 
 #undef mcount
Index: sysdeps/s390/s390-64/s390x-mcount.S
===================================================================
--- sysdeps/s390/s390-64/s390x-mcount.S.orig	2009-12-02 17:03:13.000000000 +0100
+++ sysdeps/s390/s390-64/s390x-mcount.S	2009-12-02 17:11:20.000000000 +0100
@@ -46,11 +46,15 @@
 
 	ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(_mcount)
 	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function)
+	cfi_startproc
 	.align ALIGNARG(4)
 C_LABEL(_mcount)
 	/* Save the caller-clobbered registers.  */
         aghi  %r15,-224
+	cfi_adjust_cfa_offset (224)
         stmg  %r14,%r5,160(%r15)
+	cfi_offset (r14, 0)
+	cfi_offset (r15, 8)
         lg    %r2,232(%r15)       # callers address  = first parameter
         la    %r2,0(%r2)          # clear bit 0
         la    %r3,0(%r14)         # callees address  = second parameter
@@ -65,7 +69,9 @@ C_LABEL(_mcount)
 	   return value.  */
 	lmg   %r14,%r5,160(%r15)
         aghi   %r15,224
+	cfi_adjust_cfa_offset (-224)
         br    %r14
+	cfi_endproc
 	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(_mcount))
 
 #undef mcount


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