From patchwork Sun May 25 19:41:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1136 Received: (qmail 1488 invoked by alias); 25 May 2014 19:42:07 -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 1330 invoked by uid 89); 25 May 2014 19:42:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 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-f50.google.com X-Received: by 10.140.102.166 with SMTP id w35mr24998630qge.97.1401046922701; Sun, 25 May 2014 12:42:02 -0700 (PDT) From: Richard Henderson To: libc-alpha@sourceware.org Cc: marcus.shawcroft@gmail.com, Richard Henderson Subject: [PATCH v3 1/9] aarch64: Tabify sysdep-cancel.h Date: Sun, 25 May 2014 12:41:41 -0700 Message-Id: <1401046909-25821-2-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 --- .../unix/sysv/linux/aarch64/nptl/sysdep-cancel.h | 102 ++++++++++----------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h index c300b2d..26d4c0e 100644 --- a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h @@ -26,42 +26,42 @@ # undef PSEUDO # define PSEUDO(name, syscall_name, args) \ - .section ".text"; \ - .type __##syscall_name##_nocancel,%function; \ - .globl __##syscall_name##_nocancel; \ - __##syscall_name##_nocancel: \ - cfi_startproc; \ - DO_CALL (syscall_name, args); \ - cmn x0, 4095; \ - b.cs .Lsyscall_error; \ - PSEUDO_RET; \ - cfi_endproc; \ - .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ - ENTRY (name); \ - SINGLE_THREAD_P; \ - bne .Lpseudo_cancel; \ - DO_CALL (syscall_name, 0); \ - cmn x0, 4095; \ - b.cs .Lsyscall_error; \ - PSEUDO_RET; \ - .Lpseudo_cancel: \ - DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ - CENABLE; \ - mov x16, x0; /* put mask in safe place. */ \ - UNDOCARGS_##args; /* restore syscall args. */ \ - mov x8, SYS_ify (syscall_name); /* do the call. */ \ - svc 0; \ - str x0, [sp, -16]!; /* save syscall return value. */ \ - cfi_adjust_cfa_offset (16); \ - mov x0, x16; /* get mask back. */ \ - CDISABLE; \ - ldr x0, [sp], 16; \ - cfi_adjust_cfa_offset (-16); \ - ldr x30, [sp], 16; \ - cfi_adjust_cfa_offset (-16); \ - cfi_restore (x30); \ - cmn x0, 4095; \ - b.cs .Lsyscall_error; + .section ".text"; \ + .type __##syscall_name##_nocancel,%function; \ + .globl __##syscall_name##_nocancel; \ +__##syscall_name##_nocancel: \ + cfi_startproc; \ + DO_CALL (syscall_name, args); \ + cmn x0, 4095; \ + b.cs .Lsyscall_error; \ + PSEUDO_RET; \ + cfi_endproc; \ + .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ +ENTRY (name); \ + SINGLE_THREAD_P; \ + bne .Lpseudo_cancel; \ + DO_CALL (syscall_name, 0); \ + cmn x0, 4095; \ + b.cs .Lsyscall_error; \ + PSEUDO_RET; \ +.Lpseudo_cancel: \ + DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ + CENABLE; \ + mov x16, x0; /* put mask in safe place. */ \ + UNDOCARGS_##args; /* restore syscall args. */ \ + mov x8, SYS_ify (syscall_name); /* do the call. */ \ + svc 0; \ + str x0, [sp, -16]!; /* save syscall return value. */ \ + cfi_adjust_cfa_offset (16); \ + mov x0, x16; /* get mask back. */ \ + CDISABLE; \ + ldr x0, [sp], 16; \ + cfi_adjust_cfa_offset (-16); \ + ldr x30, [sp], 16; \ + cfi_adjust_cfa_offset (-16); \ + cfi_restore (x30); \ + cmn x0, 4095; \ + b.cs .Lsyscall_error; # define DOCARGS_0 \ str x30, [sp, -16]!; \ @@ -162,9 +162,9 @@ extern int __local_multiple_threads attribute_hidden; # define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) # else # define SINGLE_THREAD_P \ - adrp x16, __local_multiple_threads; \ - ldr w16, [x16, :lo12:__local_multiple_threads]; \ - cmp w16, 0; + adrp x16, __local_multiple_threads; \ + ldr w16, [x16, :lo12:__local_multiple_threads]; \ + cmp w16, 0; # endif # else /* There is no __local_multiple_threads for librt, so use the TCB. */ @@ -174,18 +174,18 @@ extern int __local_multiple_threads attribute_hidden; header.multiple_threads) == 0, 1) # else # define SINGLE_THREAD_P \ - 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 w16, [x0, PTHREAD_MULTIPLE_THREADS_OFFSET]; \ - ldp x0, x30, [sp], 16; \ - cfi_restore (x0); \ - cfi_restore (x30); \ - cfi_adjust_cfa_offset (-16); \ - cmp w16, 0 + 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 w16, [x0, PTHREAD_MULTIPLE_THREADS_OFFSET]; \ + ldp x0, x30, [sp], 16; \ + cfi_restore (x0); \ + cfi_restore (x30); \ + cfi_adjust_cfa_offset (-16); \ + cmp w16, 0; # endif # endif