From patchwork Sun May 25 19:41: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: 352264 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 B77BE140091 for ; Mon, 26 May 2014 05:43:21 +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=kUTG+eW6vulh40SKmAvGlqvrEI4znL0 WsRsp50WklkiuC+wlAaRjN9wGEIKOcGaj5DtOmzxhqhE0LlRE1+vZx9yW57R5CcS j+EiZ9yjprxrMkzc97ERuUewBKoFQjIwkmHZCizsOSPokxSs7U9mtbcBz8DfQ7E1 72G01ppwR30A= 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=TwcfD knk9uoY2/0VjtK+KaG+INf6GtagHB36K8vhrtaRYCU5bzsitbSK2u/qBldbhM4d+ /tJtDdLb/a9fMjIh4srG9fGgXvqWWJLkM635C1gf2E+BVyLnpoQ51ZISbqSX1TOB wyl4CkkfRoiUryodCRdva/R0aegYDi+BV11qmM= Received: (qmail 2591 invoked by alias); 25 May 2014 19:42:16 -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 2375 invoked by uid 89); 25 May 2014 19:42:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-qc0-f182.google.com X-Received: by 10.140.108.163 with SMTP id j32mr25622978qgf.56.1401046931478; Sun, 25 May 2014 12:42:11 -0700 (PDT) From: Richard Henderson To: libc-alpha@sourceware.org Cc: marcus.shawcroft@gmail.com, Richard Henderson Subject: [PATCH v3 6/9] aarch64: Use tpidr_el0 rather than __errno_location in librt Date: Sun, 25 May 2014 12:41:46 -0700 Message-Id: <1401046909-25821-7-git-send-email-rth@twiddle.net> In-Reply-To: <1401046909-25821-1-git-send-email-rth@twiddle.net> References: <1401046909-25821-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