public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Will Newton <will.newton@linaro.org>
To: Andrew Pinski <apinski@cavium.com>
Cc: libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH 12/29] [AARCH64] Use PTR_REG/PTR_SIZE/PTR_SIZE_LOG in dl-tlsesc.S
Date: Tue, 18 Nov 2014 12:23:00 -0000	[thread overview]
Message-ID: <CANu=DmifHN+43aaGtDktPNQ73x9O3shsAvy3LaQ_hXhf9vqRsg@mail.gmail.com> (raw)
In-Reply-To: <1414396793-9005-13-git-send-email-apinski@cavium.com>

On 27 October 2014 07:59, Andrew Pinski <apinski@cavium.com> wrote:
> This converts dl-tlsdesc.S code over to use the new macros which allows for
> sharing between ILP32 and LP64 code.
>
> * sysdeps/aarch64/dl-tlsdesc.S (_dl_tlsdesc_return): Use PTR_REG.
> (_dl_tlsdesc_undefweak): Use PTR_REG, PTR_SIZE.
> (_dl_tlsdesc_dynamic): Likewise.
> (_dl_tlsdesc_resolve_rela): Likewise.
> (_dl_tlsdesc_resolve_hold): Likewise.
> ---
>  sysdeps/aarch64/dl-tlsdesc.S |   36 ++++++++++++++++++------------------
>  1 files changed, 18 insertions(+), 18 deletions(-)

This looks ok, although as with all these patches I would want to see
the test results for AArch64 and AArch64 ILP32 before they are
committed.

> diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S
> index ded5471..6004115 100644
> --- a/sysdeps/aarch64/dl-tlsdesc.S
> +++ b/sysdeps/aarch64/dl-tlsdesc.S
> @@ -74,7 +74,7 @@
>         cfi_startproc
>         .align 2
>  _dl_tlsdesc_return:
> -       ldr     x0, [x0, #8]
> +       ldr     PTR_REG (0), [x0, #PTR_SIZE]
>         RET
>         cfi_endproc
>         .size   _dl_tlsdesc_return, .-_dl_tlsdesc_return
> @@ -96,9 +96,9 @@ _dl_tlsdesc_return:
>  _dl_tlsdesc_undefweak:
>         str     x1, [sp, #-16]!
>         cfi_adjust_cfa_offset(16)
> -       ldr     x0, [x0, #8]
> +       ldr     PTR_REG (0), [x0, #PTR_SIZE]
>         mrs     x1, tpidr_el0
> -       sub     x0, x0, x1
> +       sub     PTR_REG (0), PTR_REG (0), PTR_REG (1)
>         ldr     x1, [sp], #16
>         cfi_adjust_cfa_offset(16)
>         RET
> @@ -152,20 +152,20 @@ _dl_tlsdesc_dynamic:
>         stp     x3,  x4, [sp, #32+16*1]
>
>         mrs     x4, tpidr_el0
> -       ldr     x1, [x0,#8]
> -       ldr     x0, [x4]
> -       ldr     x3, [x1,#16]
> -       ldr     x2, [x0]
> -       cmp     x3, x2
> +       ldr     PTR_REG (1), [x0,#PTR_SIZE]
> +       ldr     PTR_REG (0), [x4]
> +       ldr     PTR_REG (3), [x1,#(PTR_SIZE * 2)]
> +       ldr     PTR_REG (2), [x0]
> +       cmp     PTR_REG (3), PTR_REG (2)
>         b.hi    2f
> -       ldr     x2, [x1]
> -       add     x0, x0, x2, lsl #4
> -       ldr     x0, [x0]
> +       ldr     PTR_REG (2), [x1]
> +       add     PTR_REG (0), PTR_REG (0), PTR_REG (2), lsl #(PTR_LOG_SIZE + 1)
> +       ldr     PTR_REG (0), [x0]
>         cmn     x0, #0x1
>         b.eq    2f
> -       ldr     x1, [x1,#8]
> -       add     x0, x0, x1
> -       sub     x0, x0, x4
> +       ldr     PTR_REG (1), [x1,#(PTR_SIZE * 2)]
> +       add     PTR_REG (0), PTR_REG (0), PTR_REG (1)
> +       sub     PTR_REG (0), PTR_REG (0), PTR_REG (4)
>  1:
>         ldp      x1,  x2, [sp, #32+16*0]
>         ldp      x3,  x4, [sp, #32+16*1]
> @@ -196,7 +196,7 @@ _dl_tlsdesc_dynamic:
>         bl      __tls_get_addr
>
>         mrs     x1, tpidr_el0
> -       sub     x0, x0, x1
> +       sub     PTR_REG (0), PTR_REG (0), PTR_REG (1)
>
>         RESTORE_Q_REGISTERS
>
> @@ -242,13 +242,13 @@ _dl_tlsdesc_resolve_rela:
>
>         SAVE_Q_REGISTERS
>
> -       ldr     x1, [x3, #8]
> +       ldr     PTR_REG (1), [x3, #PTR_SIZE]
>         bl      _dl_tlsdesc_resolve_rela_fixup
>
>         RESTORE_Q_REGISTERS
>
>         ldr     x0, [sp, #32+16*8]
> -       ldr     x1, [x0]
> +       ldr     PTR_REG (1), [x0]
>         blr     x1
>
>         ldp      x1,  x4, [sp, #32+16*0]
> @@ -309,7 +309,7 @@ _dl_tlsdesc_resolve_hold:
>         RESTORE_Q_REGISTERS
>
>         ldr     x0, [sp, #32+16*9]
> -       ldr     x1, [x0]
> +       ldr     PTR_REG (1), [x0]
>         blr     x1
>
>         ldp      x1,  x2, [sp, #32+16*0]
> --
> 1.7.2.5
>



-- 
Will Newton
Toolchain Working Group, Linaro

  reply	other threads:[~2014-11-18 12:23 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-27  8:00 [PATCH 00/29] Add Support for AARCH64:ILP32 Andrew Pinski
2014-10-27  8:00 ` [PATCH 01/29] [AARCH64] Fix utmp struct for compatibility reasons Andrew Pinski
2014-10-27 17:57   ` Joseph S. Myers
2014-10-27 21:18     ` Andreas Schwab
2014-10-27  8:00 ` [PATCH 06/29] Allow some fields of siginfo to be different from the generic one Andrew Pinski
2014-11-18 11:31   ` Will Newton
2014-10-27  8:00 ` [PATCH 07/29] Allow generic stat and statfs not have padding for 32bit targets Andrew Pinski
2014-10-27 16:32   ` Chris Metcalf
2014-10-27  8:00 ` [PATCH 18/29] [AARCH64] Reformat inline-asm in elf_machine_load_address Andrew Pinski
2014-11-18 13:51   ` Will Newton
2014-10-27  8:00 ` [PATCH 03/29] Add ability for the IPC structures (msqid_ds, semid_ds, shmid_ds, etc.) to have time_t being 64bit Andrew Pinski
2014-10-27 16:32   ` Chris Metcalf
2014-11-18 10:57   ` Will Newton
2014-10-27  8:00 ` [PATCH 05/29] Allow fd_mask type not be an array of long Andrew Pinski
2014-10-27 16:32   ` Chris Metcalf
2014-11-18 11:24     ` Will Newton
2014-10-27  8:00 ` [PATCH 13/29] [AARCH64] Use PTR_* macros in dl-trampoline.S Andrew Pinski
2014-11-18 12:33   ` Will Newton
2014-10-27  8:00 ` [PATCH 10/29] [AARCH64] Add PTR_REG, PTR_LOG_SIZE, and PTR_SIZE. Use it in LDST_PCREL and LDST_GLOBAL Andrew Pinski
2014-11-18 12:04   ` Will Newton
2014-10-27  8:00 ` [PATCH 04/29] Allow rusage work on a big-endian 32bit-on-64bit target Andrew Pinski
2014-10-28 20:05   ` Mike Frysinger
2014-10-27  8:00 ` [PATCH 15/29] [AARCH64] Use PTR_REG in getcontext.S Andrew Pinski
2014-11-18 12:37   ` Will Newton
2014-10-27  8:00 ` [PATCH 19/29] [AARCH64] Add ILP32 support to elf_machine_load_address Andrew Pinski
2014-11-18 13:56   ` Will Newton
2014-10-27  8:00 ` [PATCH 25/29] [AARCH64] Add kernel_sigaction.h for AARCH64 ILP32 Andrew Pinski
2014-11-18 14:42   ` Will Newton
2014-10-27  8:00 ` [PATCH 09/29] Add dynamic ILP32 AARCH64 relocations to elf.h Andrew Pinski
2014-10-27 20:36   ` Roland McGrath
2014-10-27  8:00 ` [PATCH 12/29] [AARCH64] Use PTR_REG/PTR_SIZE/PTR_SIZE_LOG in dl-tlsesc.S Andrew Pinski
2014-11-18 12:23   ` Will Newton [this message]
2014-10-27  8:00 ` [PATCH 02/29] Allow sigset be an array of a different type Andrew Pinski
2014-10-27 20:32   ` Roland McGrath
2014-10-27  8:00 ` [PATCH 24/29] [AARCH64] Add ldd-rewrite.sed so that ilp32 ld.so can be found Andrew Pinski
2014-11-18 14:31   ` Will Newton
2014-10-27  8:00 ` [PATCH 08/29] [AARCH64] Add header guards to sysdep.h headers Andrew Pinski
2014-10-27 16:32   ` Chris Metcalf
2014-10-27  8:00 ` [PATCH 11/29] [AARCH64] Use PTR_REG in crti.S Andrew Pinski
2014-11-18 12:09   ` Will Newton
2014-10-27  8:00 ` [PATCH 27/29] [AARCH64] Fix up ucontext for ILP32 Andrew Pinski
2014-10-28 20:10   ` Mike Frysinger
2014-11-18 14:54   ` Will Newton
2014-10-27  8:03 ` [PATCH 21/29] [AARCH64] Add ILP32 to makefiles Andrew Pinski
2014-10-28 20:14   ` Mike Frysinger
2014-10-28 22:46     ` Joseph S. Myers
2014-10-27  8:03 ` [PATCH 28/29] [AARCH64] Add typesizes.h for ILP32 Andrew Pinski
2014-10-27 16:32   ` Chris Metcalf
2014-10-28 20:06   ` Mike Frysinger
2014-10-27  8:03 ` [PATCH 17/29] [AARCH64] Syscalls for ILP32 are passed always via 64bit values Andrew Pinski
2014-11-18 12:50   ` Will Newton
2014-10-27  8:03 ` [PATCH 14/29] [AARCH64] Use PTR_* in start.S Andrew Pinski
2014-11-18 12:35   ` Will Newton
2014-10-27  8:03 ` [PATCH 29/29] [AARCH64] Make lp64 and ilp32 directories Andrew Pinski
2014-10-27 18:07   ` Joseph S. Myers
2014-10-27  8:03 ` [PATCH 23/29] [AARCH64] Add ILP32 ld.so to the known interpreter names Andrew Pinski
2014-11-18 14:26   ` Will Newton
2014-10-27  8:03 ` [PATCH 26/29] [AARCH64] Add sigstack.h header for ILP32 reasons Andrew Pinski
2014-11-18 14:49   ` Will Newton
2014-10-27  8:03 ` [PATCH 22/29] [AARCH64] Add support to ldconfig for ILP32 and libilp32 Andrew Pinski
2014-11-18 14:20   ` Will Newton
2014-10-27  8:03 ` [PATCH 20/29] [AARCH64] Set up wordsize for ILP32 Andrew Pinski
2014-11-18 13:58   ` Will Newton
2014-10-27  8:03 ` [PATCH 16/29] [AARCH64] Detect ILP32 in configure scripts Andrew Pinski
2014-10-27 18:05   ` Joseph S. Myers
2014-10-28 20:16   ` Mike Frysinger
2014-10-28 20:18     ` Andrew Pinski
2014-10-28  9:15 ` [PATCH 00/29] Add Support for AARCH64:ILP32 Marcus Shawcroft
2015-05-26 13:37 ` Andreas Schwab
2015-05-26 14:13   ` Pinski, Andrew
2015-05-26 14:39     ` Andreas Schwab
2015-05-26 15:10       ` Pinski, Andrew
2015-05-26 15:16         ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANu=DmifHN+43aaGtDktPNQ73x9O3shsAvy3LaQ_hXhf9vqRsg@mail.gmail.com' \
    --to=will.newton@linaro.org \
    --cc=apinski@cavium.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).