From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13335 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: completely untested tlsdesc for arm (32-bit) Date: Sun, 30 Sep 2018 21:52:23 -0400 Message-ID: <20181001015223.GX17995@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oOB74oR0WcNeq9Zb" X-Trace: blaine.gmane.org 1538358632 20288 195.159.176.226 (1 Oct 2018 01:50:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 1 Oct 2018 01:50:32 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-13351-gllmg-musl=m.gmane.org@lists.openwall.com Mon Oct 01 03:50:28 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1g6nLw-0005Cw-4h for gllmg-musl@m.gmane.org; Mon, 01 Oct 2018 03:50:28 +0200 Original-Received: (qmail 30010 invoked by uid 550); 1 Oct 2018 01:52:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 29974 invoked from network); 1 Oct 2018 01:52:35 -0000 Content-Disposition: inline Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:13335 Archived-At: --oOB74oR0WcNeq9Zb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Attached in case anyone has time to review before I get a chance to test it. --oOB74oR0WcNeq9Zb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="tlsdesc.s" .text .global __tlsdesc_static .hidden __tlsdesc_static .type __tlsdesc_static,%function __tlsdesc_static: ldr r0,[r0] bx lr .hidden __tls_get_new .global __tlsdesc_dynamic .hidden __tlsdesc_dynamic .type __tlsdesc_dynamic,%function __tlsdesc_dynamic: push {r2,r3,ip,lr} ldr r1,[r0] ldr r2,[r1,#4] // r2 = offset ldr r1,[r1] // r1 = modid ldr r0,1f add r0,r0,pc ldr r0,[r0] 2: bx r0 // r0 = tp ldr r3,[r0,#-4] // r3 = dtv ldr ip,[r3] // ip = dtv slot count cmp ip,r1 bhi 3f ldr ip,[r3,r1,LSL #4] sub r0,ip,r0 add r0,r0,r2 // r0 = r3[r1]-r0+r2 4: #if __ARM_ARCH >= 5 pop {r2,r3,ip,pc} #else pop {r2,r3,ip,lr} bx lr #endif 3: #if __ARM_PCS_VFP || !__SOFTFP__ vstmia ip!, {d0-d7} #endif push {r0-r3} add r0,sp,#4 bl __tls_get_new pop {r1-r3,ip} #if __ARM_PCS_VFP || !__SOFTFP__ vldmia ip!, {d0-d7} #endif sub r0,r0,r1 // r0 = retval-tp b 4b .align 2 1: .word __a_gettp_ptr - 2b --oOB74oR0WcNeq9Zb--