From patchwork Sat May 24 00:11:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 352059 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 04439140085 for ; Sat, 24 May 2014 10:13:18 +1000 (EST) 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; q=dns; s=default; b=F0nddbWP2YbR1ghcMCd57XDwkTUqkYb /nLZpRwipCipNZTnjIIoAC6y4w22/izbKrXf6aMT0GQHqTjdY0ud1iz+c5VOaY9Q mxYQUnWf2Ox3twEolj2xllwHN20nOU3ezJAxEg/s+YpKBCliepiD7SU5qj8zFiTc zZNRwR7GoOp8= 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; s=default; bh=ZX1twX4uAtT/29+kfxi5VL/UTvk=; b=HAGgJ 35lVMF1nykITsCxCIIVms2PxlsgWLC0IGB4Sc/zCq15TZKStEHjPqv5wnETWn6C9 fPlnfgDcNFMblcXJsdIO4tSAHNmE8WE19vdq4MHtr0SF16uttbfSxbSRvzanfEN0 JvNVfeKCSuSzFpJTifTZYFhG+t5kWDRhNEYi6A= Received: (qmail 25065 invoked by alias); 24 May 2014 00:12:19 -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 25001 invoked by uid 89); 24 May 2014 00:12:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-qg0-f46.google.com X-Received: by 10.224.160.202 with SMTP id o10mr3639444qax.8.1400890336030; Fri, 23 May 2014 17:12:16 -0700 (PDT) From: Richard Henderson To: libc-alpha@sourceware.org Cc: marcus.shawcroft@gmail.com, Richard Henderson Subject: [PATCH v2 6/9] aarch64: Use tpidr_el0 rather than __errno_location in librt Date: Fri, 23 May 2014 17:11:46 -0700 Message-Id: <1400890309-16710-7-git-send-email-rth@twiddle.net> In-Reply-To: <1400890309-16710-1-git-send-email-rth@twiddle.net> References: <1400890309-16710-1-git-send-email-rth@twiddle.net> From: Richard Henderson --- sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data | 1 - sysdeps/unix/sysv/linux/aarch64/sysdep.h | 19 +++++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data b/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data index 84af95d..dfca9a7 100644 --- a/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data +++ b/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data @@ -12,4 +12,3 @@ libm.so: matherr libm.so: __signbit libm.so: __signbitf libm.so: __signbitl -libpthread.so: __errno_location diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h index 0e91f83..8cce986 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h +++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h @@ -123,21 +123,12 @@ # define SYSCALL_ERROR_HANDLER \ .Lsyscall_error: \ - stp x29, x30, [sp, -32]!; \ - cfi_adjust_cfa_offset (32); \ - cfi_rel_offset (x29, 0); \ - cfi_rel_offset (x30, 8); \ - add x29, sp, 0; \ - str x19, [sp,16]; \ - neg x19, x0; \ - bl C_SYMBOL_NAME(__errno_location); \ - str w19, [x0]; \ + adrp x1, :gottprel:errno; \ + neg w2, w0; \ + ldr x1, [x1, :gottprel_lo12:errno]; \ + mrs x3, tpidr_el0; \ mov x0, -1; \ - ldr x19, [sp,16]; \ - ldp x29, x30, [sp], 32; \ - cfi_adjust_cfa_offset (-32); \ - cfi_restore (x29); \ - cfi_restore (x30); \ + str w2, [x1, x3]; \ RET; # endif # else