about summary refs log tree commit diff
path: root/sysdeps/s390
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>2013-02-21 09:47:55 +0100
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2013-02-21 09:47:55 +0100
commite21d7aa71c0700b6611bd55881b862ac73c5cd5b (patch)
tree5369b486733e6363b238c6e320af98275bdd45a1 /sysdeps/s390
parent4c7a4263afe8304e127ae2888950f02c8bc9a9f9 (diff)
downloadglibc-e21d7aa71c0700b6611bd55881b862ac73c5cd5b.tar.gz
glibc-e21d7aa71c0700b6611bd55881b862ac73c5cd5b.tar.xz
glibc-e21d7aa71c0700b6611bd55881b862ac73c5cd5b.zip
S/390: Fix _dl_runtime_profile for 32 bit.
Diffstat (limited to 'sysdeps/s390')
-rw-r--r--sysdeps/s390/s390-32/dl-trampoline.S16
1 files changed, 11 insertions, 5 deletions
diff --git a/sysdeps/s390/s390-32/dl-trampoline.S b/sysdeps/s390/s390-32/dl-trampoline.S
index 2846d845c0..1ae43cbbc5 100644
--- a/sysdeps/s390/s390-32/dl-trampoline.S
+++ b/sysdeps/s390/s390-32/dl-trampoline.S
@@ -95,16 +95,16 @@ _dl_runtime_profile:
 	lr     %r1,%r2			# function addr returned in r2
 	icm    %r0,15,20(%r12)		# load & test framesize
 	jnm    2f
+
 	lm     %r2,%r6,32(%r12)
 	ld     %f0,56(%r12)
 	ld     %f2,64(%r12)
-	basr   %r14,%r1			# call resolved function
-1:	lr     %r15,%r12		# remove stack frame
+	lr     %r15,%r12		# remove stack frame
 	cfi_def_cfa_register (15)
 	l      %r14,16(%r15)		# restore registers
 	l      %r12,12(%r15)
-	l      %r6,8(%r15)
-	br     %r14
+	br     %r1			# tail-call to the resolved function
+
 	cfi_def_cfa_register (12)
 2:	jz     4f			# framesize == 0 ?
 	ahi    %r0,7			# align framesize to 8
@@ -131,7 +131,13 @@ _dl_runtime_profile:
 	la     %r4,32(%r12)		# pointer to struct La_s390_32_regs
 	la     %r5,72(%r12)		# pointer to struct La_s390_32_retval
 	basr   %r14,%r1			# call _dl_call_pltexit
-	j      1b
+
+	lr     %r15,%r12		# remove stack frame
+	cfi_def_cfa_register (15)
+	l      %r14,16(%r15)		# restore registers
+	l      %r12,12(%r15)
+	br     %r14
+
 6:	.long  _dl_profile_fixup - 0b
 7:	.long  _dl_call_pltexit - 5b
 	cfi_endproc