about summary refs log tree commit diff
path: root/sysdeps/s390/s390-32
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2018-08-10 09:07:43 +0200
committerStefan Liebler <stli@linux.ibm.com>2018-08-10 09:07:43 +0200
commitc8ad85225bd5968e45c716519d88743811dbdb3e (patch)
treec4f17a70bdab6490a61e01b0f5c87c9191e37d2a /sysdeps/s390/s390-32
parentb215eee1e1dca1ed76678afff2710ed7a38aedc4 (diff)
downloadglibc-c8ad85225bd5968e45c716519d88743811dbdb3e.tar.gz
glibc-c8ad85225bd5968e45c716519d88743811dbdb3e.tar.xz
glibc-c8ad85225bd5968e45c716519d88743811dbdb3e.zip
S390: Do not clobber R0 in 32-bit _dl_runtime_profile
Preparation for the usage of R0 by __fentry__.

ChangeLog:

	* sysdeps/s390/s390-32/dl-trampoline.h (_dl_runtime_profile):
	Do not clobber R0.
Diffstat (limited to 'sysdeps/s390/s390-32')
-rw-r--r--sysdeps/s390/s390-32/dl-trampoline.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/s390/s390-32/dl-trampoline.h b/sysdeps/s390/s390-32/dl-trampoline.h
index da50d9e9dc..f67a47c5d0 100644
--- a/sysdeps/s390/s390-32/dl-trampoline.h
+++ b/sysdeps/s390/s390-32/dl-trampoline.h
@@ -166,6 +166,7 @@ _dl_runtime_resolve:
 # define V29_OFF -144
 # define V30_OFF -128
 # define V31_OFF -112
+# define R0_OFF -88
 # define R12_OFF -84
 # define R14_OFF -80
 # define FRAMESIZE_OFF -76
@@ -182,6 +183,8 @@ _dl_runtime_resolve:
 	cfi_startproc
 	.align 16
 _dl_runtime_profile:
+	st     %r0,CFA_OFF+R0_OFF(%r15)
+	cfi_offset (r0, R0_OFF)
 	st     %r12,CFA_OFF+R12_OFF(%r15)	# r12 is used as backup of r15
 	cfi_offset (r12, R12_OFF)
 	st     %r14,CFA_OFF+R14_OFF(%r15)
@@ -245,6 +248,7 @@ _dl_runtime_profile:
 	cfi_def_cfa_register (15)
 	l      %r14,CFA_OFF+R14_OFF(%r15)	# restore registers
 	l      %r12,CFA_OFF+R12_OFF(%r15)
+	l      %r0,CFA_OFF+R0_OFF(%r15)
 	br     %r1				# tail call
 
 	cfi_def_cfa_register (12)
@@ -285,6 +289,7 @@ _dl_runtime_profile:
 	cfi_def_cfa_register (15)
 	l      %r14,CFA_OFF+R14_OFF(%r15)	# restore registers
 	l      %r12,CFA_OFF+R12_OFF(%r15)
+	l      %r0,CFA_OFF+R0_OFF(%r15)
 	lm     %r2,%r3,CFA_OFF+RET_R2_OFF(%r15)	# restore return values
 	ld     %f0,CFA_OFF+RET_F0_OFF(%r15)
 # ifdef RESTORE_VRS
@@ -316,6 +321,7 @@ _dl_runtime_profile:
 # undef V29_OFF
 # undef V30_OFF
 # undef V31_OFF
+# undef R0_OFF
 # undef R12_OFF
 # undef R14_OFF
 # undef FRAMESIZE_OFF