From patchwork Sat May 24 00:11:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 352058 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 C0EB8140085 for ; Sat, 24 May 2014 10:13:07 +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=wR7W5bKnjuekKbRJ6ypJBr9W3bjkrpW 1Brv1vZoOkqC8Plw3tWbxabdIL2eZeUEMbbocjUzee2P+W20ORbrBEOsoY/u2BXw +KhILOtnxzyEfMDSTRjsrdqAb+lusZ6SYlMp087LUKMDaHUTb4Xkgl8O+bErdr25 K5zFkYgB9QnA= 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=kSFrFRICVxDj3NQYvAbRugXetLo=; b=sUIPa Qf4ExrxYgGkXYjBVlNO6HGmyNMLE2GjkmRaH3lO0Wr9I+9v0AGq87xEjJmNl6oer kso5KBmQ2LkuQPmCpMpfBEhd07DIgqdkUh0OLhLvWDaFlc300XuMAGTXwf0jrmSi gy2VvBRJ42zoFG6u6LVqaeEwHhP9V1jllooVqs= Received: (qmail 24793 invoked by alias); 24 May 2014 00:12:17 -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 24718 invoked by uid 89); 24 May 2014 00:12:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-qg0-f53.google.com X-Received: by 10.140.37.49 with SMTP id q46mr10791610qgq.39.1400890333906; Fri, 23 May 2014 17:12:13 -0700 (PDT) From: Richard Henderson To: libc-alpha@sourceware.org Cc: marcus.shawcroft@gmail.com, Richard Henderson Subject: [PATCH v2 5/9] aarch64: Use tpidr_el0 rather than __read_tp in librt Date: Fri, 23 May 2014 17:11:45 -0700 Message-Id: <1400890309-16710-6-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/sysdep-cancel.h | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h index a78e2ad..3578650 100644 --- a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h @@ -108,8 +108,8 @@ extern int __local_multiple_threads attribute_hidden; # define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) # else # define SINGLE_THREAD_P(R) \ - adrp x##R, __local_multiple_threads; \ - ldr w##R, [x##R, :lo12:__local_multiple_threads] + adrp x##R, __local_multiple_threads; \ + ldr w##R, [x##R, :lo12:__local_multiple_threads] # endif # else /* There is no __local_multiple_threads for librt, so use the TCB. */ @@ -119,18 +119,9 @@ extern int __local_multiple_threads attribute_hidden; header.multiple_threads) == 0, 1) # else # define SINGLE_THREAD_P(R) \ - stp x0, x30, [sp, -16]!; \ - cfi_adjust_cfa_offset (16); \ - cfi_rel_offset (x0, 0); \ - cfi_rel_offset (x30, 8); \ - bl __read_tp; \ - sub x0, x0, PTHREAD_SIZEOF; \ - ldr w##R, [x0, PTHREAD_MULTIPLE_THREADS_OFFSET]; \ - ldp x0, x30, [sp], 16; \ - cfi_restore (x0); \ - cfi_restore (x30); \ - cfi_adjust_cfa_offset (-16); \ - cmp w16, 0 + mrs x##R, tpidr_el0; \ + sub x##R, x##R, PTHREAD_SIZEOF; \ + ldr w##R, [x##R, PTHREAD_MULTIPLE_THREADS_OFFSET] # endif # endif