Message ID | 1400619378-7262-2-git-send-email-rth@twiddle.net |
---|---|
State | Superseded |
Headers |
Return-Path: <x14307373@homiemail-mx21.g.dreamhost.com> X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id BC88E360098 for <siddhesh@wilcox.dreamhost.com>; Tue, 20 May 2014 13:57:06 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 70EDF193B957; Tue, 20 May 2014 13:57:06 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com 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 homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id DD80E195086F for <glibc@patchwork.siddhesh.in>; Tue, 20 May 2014 13:57:05 -0700 (PDT) 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=yErcU5J258YSjCIYV8XGAt6kMIsUSka 79ms6ryKP6g45xyIknW9vPUy+kSq+BdsQLdBRDb91VYrrL3jXzASs0ecd8aEOPya oZ7ZfCxAYo0MLbQHDH0oDZpBWs16CdAG33zZjmFjlNolmYi+ZtQ2TW25kH2VhgCn OOu8K7+lkHXo= 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=2YDA4kqhZr9kSqUuBI1XXF9L7+M=; b=ezfYv o2ltQJHLm0QIRBZhA4whTLyMVM7cv+beYNsqaf8glPFneF6OHGpRW0STVsSRuOtm Se4C6FVDSOhO8PiDhGoJa+Z8zYxCct4rPtfQWVXD+kPwQiCwXVX2kmJdAPojUfVh 4Ju8FExnMRhmI4aeRoJDolcE4VAjCib06gvhkM= Received: (qmail 17781 invoked by alias); 20 May 2014 20:56:56 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-glibc=patchwork.siddhesh.in@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 17719 invoked by uid 89); 20 May 2014 20:56:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 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-f181.google.com X-Received: by 10.224.73.136 with SMTP id q8mr60926004qaj.54.1400619413172; Tue, 20 May 2014 13:56:53 -0700 (PDT) From: Richard Henderson <rth@twiddle.net> To: libc-alpha@sourceware.org Cc: marcus.shawcroft@gmail.com, Richard Henderson <rth@redhat.com> Subject: [PATCH 1/6] aarch64: Merge rtld_errno offset with memory reference Date: Tue, 20 May 2014 13:56:13 -0700 Message-Id: <1400619378-7262-2-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> X-DH-Original-To: glibc@patchwork.siddhesh.in |
Commit Message
Richard Henderson
May 20, 2014, 8:56 p.m. UTC
From: Richard Henderson <rth@redhat.com>
* sysdeps/unix/sysv/linux/aarch64/sysdep.h [RTLD_PRIVATE_ERRNO]
(SYSCALL_ERROR_HANDLER): Fold add insn into str offset.
---
sysdeps/unix/sysv/linux/aarch64/sysdep.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On 20 May 2014 21:56, Richard Henderson <rth@twiddle.net> wrote: > From: Richard Henderson <rth@redhat.com> > > * sysdeps/unix/sysv/linux/aarch64/sysdep.h [RTLD_PRIVATE_ERRNO] > (SYSCALL_ERROR_HANDLER): Fold add insn into str offset. > --- > sysdeps/unix/sysv/linux/aarch64/sysdep.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h > index d90ef25..8397ad3 100644 > --- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h > +++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h > @@ -117,9 +117,8 @@ > # define SYSCALL_ERROR_HANDLER \ > __local_syscall_error: \ > adrp x1, C_SYMBOL_NAME(rtld_errno); \ > - add x1, x1, #:lo12:C_SYMBOL_NAME(rtld_errno); \ > neg w0, w0; \ > - str w0, [x1]; \ > + str w0, [x1, :lo12:C_SYMBOL_NAME(rtld_errno)]; \ > mov x0, -1; \ > RET; > # else > -- > 1.9.0 > This is fine. Thanks /Marcus
On 23 May 2014 21:34, Richard Henderson <rth@twiddle.net> wrote: > It's required in the context of the add, and not required (but accepted) in the > context of an address operand. The relevant documentation here is: PRD03-GENC-010197 section 4.1. The # is optional on all immediates. The spec also requires that disassemblers should always emit the # for readability. > Personally, I prefer not using # in an address; which form do the AArch64 > maintainers prefer? I think we should insert the # for all immediates. I'm curious about Richards statement above, have you seen a scenario where the assembler refuses to accept the # on an add? I doubled checked this particular case with and without using trunk gas and it seems to be fine. Cheers /Marcus
diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h index d90ef25..8397ad3 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h +++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h @@ -117,9 +117,8 @@ # define SYSCALL_ERROR_HANDLER \ __local_syscall_error: \ adrp x1, C_SYMBOL_NAME(rtld_errno); \ - add x1, x1, #:lo12:C_SYMBOL_NAME(rtld_errno); \ neg w0, w0; \ - str w0, [x1]; \ + str w0, [x1, :lo12:C_SYMBOL_NAME(rtld_errno)]; \ mov x0, -1; \ RET; # else