From patchwork Thu Aug 2 07:57:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Leoshkevich X-Patchwork-Id: 952633 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-95006-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="osnFJWm2"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41h3Yl2ykvz9s2g for ; Thu, 2 Aug 2018 18:41:31 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:in-reply-to:references :message-id; q=dns; s=default; b=aPEHWecbRAdzQYR5fiN7O9+ggwzpxVK yHj/rjTdlpGiQuD8Ms1THWHvftr3CKNIqbbzFtBENEy1h+7uCdGIal8EjWnbBu0l vwqPsSu3H2gEdSpww2mwSTpT4dQ1xykqbmTeY5+bY+63EuGJNoIHPFwmRV5ADOnI PJlKPX9SC7+4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:in-reply-to:references :message-id; s=default; bh=QpMFQDKYkeLnFELD7O+MjVct7cA=; b=osnFJ Wm2XGyXc/zgKfPDYqTQztTX4nTzZh/zJ7YfMt1B0g+Wgs0Aj96HTV4hHUyQJXmxM aQ2r5pZO4H6mDhqSkAqoN6O/Ojh4F1avoNsoUFPSEvki1yC9j9NWEZFUMzL35fHH dPCVegoZ34jhPQJJuCRE0vls6qs/W3sBmT/DT8= Received: (qmail 28432 invoked by alias); 2 Aug 2018 08:41:25 -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 28266 invoked by uid 89); 2 Aug 2018 08:41:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-27.3 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= X-HELO: mx0a-001b2d01.pphosted.com From: Ilya Leoshkevich To: libc-alpha@sourceware.org Cc: stli@linux.ibm.com, Ilya Leoshkevich Subject: [PATCH 06/12] S390: Do not clobber R0 in 32-bit _dl_runtime_profile Date: Thu, 2 Aug 2018 09:57:29 +0200 In-Reply-To: <20180802075735.3457-1-iii@linux.ibm.com> References: <20180802075735.3457-1-iii@linux.ibm.com> x-cbid: 18080207-0012-0000-0000-00000292A286 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080207-0013-0000-0000-000020C4AE46 Message-Id: <20180802075735.3457-7-iii@linux.ibm.com> Preparation for the usage of R0 by __fentry__. * sysdeps/s390/s390-32/dl-trampoline.h (_dl_runtime_profile): Do not clobber R0. --- sysdeps/s390/s390-32/dl-trampoline.h | 6 ++++++ 1 file changed, 6 insertions(+) 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