From patchwork Tue Jun 21 05:06:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 70506 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1830808qgy; Mon, 20 Jun 2016 22:09:14 -0700 (PDT) X-Received: by 10.107.149.82 with SMTP id x79mr27942075iod.141.1466485754767; Mon, 20 Jun 2016 22:09:14 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id l82si37842392pfa.120.2016.06.20.22.09.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2016 22:09:14 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-70816-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-70816-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-70816-patch=linaro.org@sourceware.org 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:message-id:in-reply-to :references:mime-version:content-type; q=dns; s=default; b=EGF0B WVYxDYvR+cmIQla5BzkwrczVgDRtffEfqr3+T9X8PZi9DE6kRDeHCSB+BHO7/1Kt FgrL/RRo/vJhNDWAjxdntzz23HgGaMwwBeWePYNZE01wDKDwX5f53jm8fw6YF1AP YrSb8JY4Q9EKjzCQ07zIOPWGMBWCRBhSA+G+a0= 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:message-id:in-reply-to :references:mime-version:content-type; s=default; bh=bLVvdzDF1fj KSsIFAdD4uFt4K7Y=; b=icW9/yNzHrqP7YzV7EKewog+BCBBJrdHsllpOX7A1Ea 65pVu7QcDvdpLSVUcn/mdmVCS+K8GRWR/K/sUaR/x32jCnr1bdPzHk7xEliYUAqJ eJkX9VoeixpSsyJtCl4NHfnTWghNcRE+EYaCNEqo/NU/PJbs7a8KJUAgs8eE2qlI = Received: (qmail 107490 invoked by alias); 21 Jun 2016 05:08:57 -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 107469 invoked by uid 89); 21 Jun 2016 05:08:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=UD:b.eq, b.eq, 1269, mrs X-HELO: na01-by2-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , CC: , , , , , , , , , Andrew Pinski , Yury Norov Subject: [PATCH 06/27] [AARCH64] Use PTR_REG/PTR_SIZE/PTR_SIZE_LOG in dl-tlsesc.S Date: Tue, 21 Jun 2016 08:06:50 +0300 Message-ID: <1466485631-3532-8-git-send-email-ynorov@caviumnetworks.com> In-Reply-To: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> References: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: HE1PR03CA0037.eurprd03.prod.outlook.com (10.163.170.175) To DM3PR07MB2249.namprd07.prod.outlook.com (10.164.33.147) X-MS-Office365-Filtering-Correlation-Id: 08020760-9bab-4437-a7cb-08d39992233a X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 2:sfFPZgXwGHgDqBC8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4Htj9CLdDFPTMnIbtslKirEQOJaRONzy8ZSsmKlPoi7UeRd4wTFm/EPXMbpdLJ9+zatsGa9myjHZ8hAXD++eYhvApo/1KjNSHnO/2Mlo6Ew== X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 20:d8fSCnpU3PlcJzDY27BG0O2Hv2YCX0+PzSfgGavEBwZAFGY01B/U9GxYKAyo1xiXtrszI1zpRRRG4sFPv02UuURWBV1uvD96MCmP4YougsVYBgOY/cnFS2H4M/1/wermSzL12depWOAJsXsRK1OuXCL2FObcvQt/9158p+ih5m2b9ZgD1H90EvuJjeVqu+yACs6/oDA2zd8bNOA3n0XCc1KKKDDeWmNEu7fmEfbXVip9Irn1ACnbD/bMdUFhMad0PkYghPVhDX3I/kDqMOUbjwVlJaAD9Q/MJVhrTgin58pceyksbDOqtmlu+ffz8DIfSESLhiGZ6lxI723p8hePaomW5Su/rtVP/WMtHPjNawCVQqpYtteAUzt4sX5yhHR19zLA3fhRUffjWGKUcntz1+GnJJcbbW4ojUjV8JVhAhOWaxXsDc55no1Kp8pXuetWoCTgJDJBNtIfrPSzD+4SHmJTto/X3Hyb3N9VAs+/4aD14CWf+B1fcnq38lsWEye1IOYfYCPrAiXFK7TPQ6oxnCvo34dgY5Br3buobH5SvPwqzYGHwFm+t87PpObScrCZJSyoLFhnta50sWUz4BnYeKJ0RnTTBVNHflvC2CvyeSo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:DM3PR07MB2249; BCL:0; PCL:0; RULEID:; SRVR:DM3PR07MB2249; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 4:vKesaap/JbxoBTkZKmJ41nfwJnXQWgKF2genFvTjnDDef9Pk7c7j3c00lgbpZXqvgn2+cd1s9f8nsE1yYDe4W6d9r4QLqGlmyzuJf1U3wsEKJ1e0fN8A9ZK5gSSx9s/YinHTuMAW0SeP10KcRug4VUdCpMAAzudaj++2YUoEh8W2Q+UjbdKB63JyeJwnDkLaUmRiXTXIkmbl1FmxiK2ja9l8z1I5dF85gZC/6Id5AmHtL/I/WW4kKWGBvdUQdeTUoHP4CWVU2WiA9Qe2GWqZ8igiKhEQxJXeGJhUNiU2TRmcZNpdCzcdTTKrIyQXAMu7mKZnoZ/AdvuE4zY+aiPr2M9l/Q1bWaKAXjmIyXhBnl8jF1UtFOiIuqdPr3fOa4Je X-Forefront-PRVS: 098076C36C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(199003)(189002)(2906002)(106356001)(33646002)(92566002)(8676002)(19580405001)(19580395003)(36756003)(97736004)(76506005)(48376002)(7846002)(50466002)(7736002)(68736007)(5003940100001)(101416001)(4326007)(189998001)(107886002)(42186005)(50226002)(50986999)(76176999)(6116002)(66066001)(3846002)(81166006)(229853001)(77096005)(81156014)(2950100001)(105586002)(4001430100002)(47776003)(586003)(5001770100001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR07MB2249; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR07MB2249; 23:oDwiAfhSZGFdDI5J02hUWoAdt4+3yT1sCfysoBw9Q?= =?us-ascii?Q?vR8thsIYs/9nV512C48UXF7KRJiLJ1nwYCneIEUXFl9hAL5WdYcsuJKT4Hxy?= =?us-ascii?Q?IX1JqkOilsY/eirt/AWO6xrzSBZ9qZgWo+vKA8stnfSsTZNgGUS95rFjuEGV?= =?us-ascii?Q?NMECS2a+FacUEVhF4MMsr8G9eMe9xgjnyB6H6G02TTj9LVGmw6xTW05KlHiz?= =?us-ascii?Q?vb3EhAx4MC8UPUDVx69g9QEnPhKAFMTZZdN9Coxr2fXU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X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 6:6H/qzzjLwCnjtt9Hz4KQ9JRvcWTeTQDQ16IJmwbAbCiEO//QIMOgcPpLtJ61kQiPrwgJuBJWcBSEmsKczE/kxyhlsZ+1uleMRtKkHsihS9M4PLIbok/WVwdGbTLQ59EEy4u2BiXhBxTzW+7Rn5uiG2NLk5l7jmzLnLLAMw9OVib8fxriYST3NBxXo2RZ6RMaBb+G4jqt/F+7xp8roFm2u+RVTHH9mSe6vqKA7AHq963RXmjPaoRiz1bfoliEE3Abjs6BzNvzGZhaqx8aaYzH0vyCyjvy00Q84Vf+3RZhdbc=; 5:pTGnRobg+grZ0cFrKpZj8D6D50fvVhNXPThXkdlxPPomOXjt57yN8NE7h1d+ywLKvun/fLqSmBPqCPjTKUwzGgWd+gvQjpSqFgpfjNwVLJlOcbbXOWHtIky3WIzZXq2dQgd5hRbkVPwn2h/6V6497g==; 24:YuO44+uu5q2spD8jl4BBU7Mu787MNtrs1W6st/t0oiLtMrIxsKL5feT4rfWSNNOoyz9yZNDdKevbRrYj4qhhKi6XT1YcSqnra8vMfEF/fls=; 7:uBtmKV0JtYDjcaDi7mLhTDmcfv/876Qkg13BKt6pT868ydj/naFNO1uCFZGJxLpk44EzvlU/F8amf8CWyHgiNhsSabs8wGcakZhYPYtgVzO2YGobUBfZtcoPRXYRGhZNJif9CygGOLxWoIjBmgrmEoWUx/vZE8UQEw+uZmarJLjoFp0+70sqZJVviNfZj0W92NvJvPdA0op0yNNJcYXmPbc23DIA1DxUlMFd9DUY1Pv1CzQuntymNMddpmJWTUzg SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2016 05:08:51.9919 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2249 From: Andrew Pinski This converts dl-tlsdesc.S code over to use the new macros which allows for sharing between ILP32 and LP64 code. * sysdeps/aarch64/dl-tlsdesc.S (_dl_tlsdesc_return): Use PTR_REG. (_dl_tlsdesc_undefweak): Use PTR_REG, PTR_SIZE. (_dl_tlsdesc_dynamic): Likewise. (_dl_tlsdesc_resolve_rela): Likewise. (_dl_tlsdesc_resolve_hold): Likewise. Signed-off-by: Yury Norov --- sysdeps/aarch64/dl-tlsdesc.S | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) -- 2.7.4 diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S index 05be370..fe8a17d 100644 --- a/sysdeps/aarch64/dl-tlsdesc.S +++ b/sysdeps/aarch64/dl-tlsdesc.S @@ -74,7 +74,7 @@ cfi_startproc .align 2 _dl_tlsdesc_return: - ldr x0, [x0, #8] + ldr PTR_REG (0), [x0, #PTR_SIZE] RET cfi_endproc .size _dl_tlsdesc_return, .-_dl_tlsdesc_return @@ -126,9 +126,9 @@ _dl_tlsdesc_undefweak: td->entry in _dl_tlsdesc_resolve_rela_fixup ensuring that the load from [x0,#8] here happens after the initialization of td->arg. */ ldar xzr, [x0] - ldr x0, [x0, #8] + ldr PTR_REG (0), [x0, #PTR_SIZE] mrs x1, tpidr_el0 - sub x0, x0, x1 + sub PTR_REG (0), PTR_REG (0), PTR_REG (1) ldr x1, [sp], #16 cfi_adjust_cfa_offset (-16) RET @@ -189,20 +189,20 @@ _dl_tlsdesc_dynamic: td->entry in _dl_tlsdesc_resolve_rela_fixup ensuring that the load from [x0,#8] here happens after the initialization of td->arg. */ ldar xzr, [x0] - ldr x1, [x0,#8] - ldr x0, [x4] - ldr x3, [x1,#16] - ldr x2, [x0] - cmp x3, x2 + ldr PTR_REG (1), [x0,#PTR_SIZE] + ldr PTR_REG (0), [x4] + ldr PTR_REG (3), [x1,#(PTR_SIZE * 2)] + ldr PTR_REG (2), [x0] + cmp PTR_REG (3), PTR_REG (2) b.hi 2f - ldr x2, [x1] - add x0, x0, x2, lsl #4 - ldr x0, [x0] + ldr PTR_REG (2), [x1] + add PTR_REG (0), PTR_REG (0), PTR_REG (2), lsl #(PTR_LOG_SIZE + 1) + ldr PTR_REG (0), [x0] cmn x0, #0x1 b.eq 2f - ldr x1, [x1,#8] - add x0, x0, x1 - sub x0, x0, x4 + ldr PTR_REG (1), [x1,#(PTR_SIZE * 2)] + add PTR_REG (0), PTR_REG (0), PTR_REG (1) + sub PTR_REG (0), PTR_REG (0), PTR_REG (4) 1: ldp x1, x2, [sp, #32+16*0] ldp x3, x4, [sp, #32+16*1] @@ -233,7 +233,7 @@ _dl_tlsdesc_dynamic: bl __tls_get_addr mrs x1, tpidr_el0 - sub x0, x0, x1 + sub PTR_REG (0), PTR_REG (0), PTR_REG (1) RESTORE_Q_REGISTERS @@ -279,13 +279,13 @@ _dl_tlsdesc_resolve_rela: SAVE_Q_REGISTERS - ldr x1, [x3, #8] + ldr PTR_REG (1), [x3, #PTR_SIZE] bl _dl_tlsdesc_resolve_rela_fixup RESTORE_Q_REGISTERS ldr x0, [sp, #32+16*8] - ldr x1, [x0] + ldr PTR_REG (1), [x0] blr x1 ldp x1, x4, [sp, #32+16*0] @@ -346,7 +346,7 @@ _dl_tlsdesc_resolve_hold: RESTORE_Q_REGISTERS ldr x0, [sp, #32+16*9] - ldr x1, [x0] + ldr PTR_REG (1), [x0] blr x1 ldp x1, x2, [sp, #32+16*0]