]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/unix/sysv/linux/sh/sysdep.h
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / sh / sysdep.h
index 5215a845d90bb666e1aafb24e4f3fac5b7015925..52e77c9913cfdc6c8b366b1f7949546649d23e3b 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (C) 1992,1993,1995-2000,2002-2006,2009,2011
-       Free Software Foundation, Inc.
+/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
    Changed by Kaz Kojima, <kkojima@rr.iij4u.or.jp>.
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #ifndef _LINUX_SH_SYSDEP_H
 #define _LINUX_SH_SYSDEP_H 1
 
 /* There is some commonality.  */
+#include <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/sh/sysdep.h>
 #include <tls.h>
 
 # if RTLD_PRIVATE_ERRNO
 #  define SYSCALL_ERROR_HANDLER        \
        neg r0,r1; \
+       mov r12,r2; \
+       cfi_register (r12, r2); \
        mov.l 0f,r12; \
        mova 0f,r0; \
        add r0,r12; \
        mov.l 1f,r0; \
        mov.l r1,@(r0,r12); \
+       mov r2,r12; \
+       cfi_restore (r12); \
        bra .Lpseudo_end; \
         mov _IMM1,r0; \
        .align 2; \
 
 # elif defined _LIBC_REENTRANT
 
-#  ifndef NOT_IN_libc
+#  if IS_IN (libc)
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
 #   define SYSCALL_ERROR_ERRNO errno
 #  define SYSCALL_ERROR_HANDLER \
        neg r0,r1; \
        mov r12,r2; \
+       cfi_register (r12, r2); \
        mov.l 0f,r12; \
        mova 0f,r0; \
        add r0,r12; \
        stc gbr, r4; \
        mov.l @(r0,r12),r0; \
        mov r2,r12; \
+       cfi_restore (r12); \
        add r4,r0; \
        mov.l r1,@r0; \
        bra .Lpseudo_end; \
 #  define SYSCALL_ERROR_HANDLER                                                      \
        neg r0,r1; \
        mov r12,r2; \
+       cfi_register (r12, r2); \
        mov.l 0f,r12; \
        mova 0f,r0; \
        add r0,r12; \
        mov.l 1f,r0; \
        mov.l @(r0,r12),r0; \
        mov r2,r12; \
+       cfi_restore (r12); \
        mov.l r1,@r0; \
        bra .Lpseudo_end; \
         mov _IMM1,r0; \
 #endif /* __ASSEMBLER__ */
 
 /* Pointer mangling support.  */
-#if defined NOT_IN_libc && defined IS_IN_rtld
+#if IS_IN (rtld)
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  Using a global variable
    is too complicated here since we have no PC-relative addressing mode.  */