From patchwork Thu Aug 2 07:57:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Leoshkevich X-Patchwork-Id: 28733 Received: (qmail 125852 invoked by alias); 2 Aug 2018 07:59:08 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 125769 invoked by uid 89); 2 Aug 2018 07:59:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-27.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=2537 X-HELO: mx0a-001b2d01.pphosted.com From: Ilya Leoshkevich To: libc-alpha@sourceware.org Cc: stli@linux.ibm.com, Ilya Leoshkevich Subject: [PATCH 08/12] S390: Do not clobber R0 in 64-bit _dl_runtime_profile Date: Thu, 2 Aug 2018 09:57:31 +0200 In-Reply-To: <20180802075735.3457-1-iii@linux.ibm.com> References: <20180802075735.3457-1-iii@linux.ibm.com> x-cbid: 18080207-0020-0000-0000-000002AFD2B3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080207-0021-0000-0000-000020FBFD5A Message-Id: <20180802075735.3457-9-iii@linux.ibm.com> Preparation for the usage of R0 by __fentry__. * sysdeps/s390/s390-64/dl-trampoline.h (_dl_runtime_profile): Do not clobber R0. --- sysdeps/s390/s390-64/dl-trampoline.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sysdeps/s390/s390-64/dl-trampoline.h b/sysdeps/s390/s390-64/dl-trampoline.h index a9d56a6925..fc5ba23563 100644 --- a/sysdeps/s390/s390-64/dl-trampoline.h +++ b/sysdeps/s390/s390-64/dl-trampoline.h @@ -170,6 +170,7 @@ _dl_runtime_resolve: # define V29_OFF -208 # define V30_OFF -192 # define V31_OFF -176 +# define R0_OFF -144 # define R12_OFF -136 # define R14_OFF -128 # define FRAMESIZE_OFF -120 @@ -185,6 +186,8 @@ _dl_runtime_resolve: cfi_startproc .align 16 _dl_runtime_profile: + stg %r0,CFA_OFF+R0_OFF(%r15) + cfi_offset (r0, R0_OFF) stg %r12,CFA_OFF+R12_OFF(%r15) # r12 is used as backup of r15 cfi_offset (r12, R12_OFF) stg %r14,CFA_OFF+R14_OFF(%r15) @@ -250,6 +253,7 @@ _dl_runtime_profile: cfi_def_cfa_register (15) lg %r14,CFA_OFF+R14_OFF(%r15) # restore registers lg %r12,CFA_OFF+R12_OFF(%r15) + lg %r0,CFA_OFF+R0_OFF(%r15) br %r1 # tail call cfi_def_cfa_register (12) @@ -287,6 +291,7 @@ _dl_runtime_profile: cfi_def_cfa_register (15) lg %r14,CFA_OFF+R14_OFF(%r15) # restore registers lg %r12,CFA_OFF+R12_OFF(%r15) + lg %r0,CFA_OFF+R0_OFF(%r15) lg %r2,CFA_OFF+RET_R2_OFF(%r15) # restore return values ld %f0,CFA_OFF+RET_F0_OFF(%r15) # ifdef RESTORE_VRS @@ -318,6 +323,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