From patchwork Tue May 20 20:56:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 350876 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 B6F92140082 for ; Wed, 21 May 2014 06:58:03 +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=uFfjGzFD4AjK9K+ZcRQgq039ZeGEZ5Q /j5+hmYu5aSAAy7I73fUEttvPYSXX+nQ8NkeqxruDKhk/gBpddIWGI5Ty504IUWy ARJOlK7Cw6xe4xf6/PEE4fOWdSjBGkKUKTM71eUS1thEesM/Uj0ruVPDGlqfc3PC n0EFbKICx18g= 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=x8sfmke+l4J1tNOEH0716j/ZMjM=; b=x8Q7Z iTbM7pXd1godxPUh4W0s/B3SwN0KLW90kPLaOE07kgWsaitK72bonYZRSX97QZp2 YlruTj8h6uljFU4E0dhtGPGMCFnNp7A3hK38w4+kWAPqki0kESvb1u3VwD/Uc94z nsiKFbyyixJuqaBDT8EluN2A9opfyAZVw4JGww= Received: (qmail 18804 invoked by alias); 20 May 2014 20:57:04 -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 18761 invoked by uid 89); 20 May 2014 20:57:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 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-f47.google.com X-Received: by 10.224.20.72 with SMTP id e8mr60723838qab.86.1400619421578; Tue, 20 May 2014 13:57:01 -0700 (PDT) From: Richard Henderson To: libc-alpha@sourceware.org Cc: marcus.shawcroft@gmail.com, Richard Henderson Subject: [PATCH 6/6] aarch64: Use tpidr_el0 rather than __errno_location in librt Date: Tue, 20 May 2014 13:56:18 -0700 Message-Id: <1400619378-7262-7-git-send-email-rth@twiddle.net> In-Reply-To: <1400619378-7262-1-git-send-email-rth@twiddle.net> References: <1400619378-7262-1-git-send-email-rth@twiddle.net> From: Richard Henderson * sysdeps/unix/sysv/linux/aarch64/sysdep.h [NOT_IN_libc] (SYSCALL_ERROR_HANDLER): Use tpidr_el0 rather than __errno_location. --- sysdeps/unix/sysv/linux/aarch64/sysdep.h | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h index b32a565..73782a6 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