diff options
author | Richard Henderson <rth@redhat.com> | 2014-05-25 14:07:17 -0400 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2014-05-29 12:31:07 -0400 |
commit | a8b4f04ad7dff4f39797a7ab7f8babda54266026 (patch) | |
tree | f1c357dda1d1b909f31e772e8d12a4a7893afd2d /sysdeps | |
parent | af4e8ef9443e258ebeb0ddf3c5c9579f24dfacd5 (diff) | |
download | glibc-a8b4f04ad7dff4f39797a7ab7f8babda54266026.tar glibc-a8b4f04ad7dff4f39797a7ab7f8babda54266026.tar.gz glibc-a8b4f04ad7dff4f39797a7ab7f8babda54266026.tar.bz2 glibc-a8b4f04ad7dff4f39797a7ab7f8babda54266026.zip |
aarch64: Share code in syscall-cancel.h
Fold nocancel and error handling paths.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h | 28 |
1 files changed, 14 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 26d4c0ec8b..41502de602 100644 --- a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h @@ -27,24 +27,17 @@ # undef PSEUDO # define PSEUDO(name, syscall_name, args) \ .section ".text"; \ - .type __##syscall_name##_nocancel,%function; \ - .globl __##syscall_name##_nocancel; \ -__##syscall_name##_nocancel: \ - cfi_startproc; \ +ENTRY (__##syscall_name##_nocancel); \ +.Lpseudo_nocancel: \ DO_CALL (syscall_name, args); \ +.Lpseudo_finish: \ cmn x0, 4095; \ b.cs .Lsyscall_error; \ - PSEUDO_RET; \ - cfi_endproc; \ + .subsection 2; \ .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: \ + beq .Lpseudo_nocancel; \ DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ CENABLE; \ mov x16, x0; /* put mask in safe place. */ \ @@ -60,8 +53,15 @@ ENTRY (name); \ ldr x30, [sp], 16; \ cfi_adjust_cfa_offset (-16); \ cfi_restore (x30); \ - cmn x0, 4095; \ - b.cs .Lsyscall_error; + b .Lpseudo_finish; \ + cfi_endproc; \ + .size name, .-name; \ + .previous + +# undef PSEUDO_END +# define PSEUDO_END(name) \ + SYSCALL_ERROR_HANDLER; \ + cfi_endproc # define DOCARGS_0 \ str x30, [sp, -16]!; \ |