]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/unix/sysv/linux/sh/vfork.S
Update copyright notices with scripts/update-copyrights
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / sh / vfork.S
index 92426892a39bd1f79fe20a4e63718cf7f42b5826..436e4fb491fc1dad5ec3d8ca5dc82fad5506187c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2014 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +12,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
 #define _ERRNO_H       1
@@ -39,28 +38,8 @@ ENTRY (__vfork)
        mov.w   .L1, r1
        cmp/eq  r1, r0
        bt      2f
-       mov.l   .L2, r1
-#ifdef SHARED
-       mov     r0, r4
-       mov.l   r12, @-r15
-       sts.l   pr, @-r15
-       mov.l   0f, r12
-       mova    0f, r0
-       add     r0, r12
-       mova    .L2, r0
-       add     r0, r1
-       jsr     @r1
+       bra     .Lsyscall_error
         nop
-       lds.l   @r15+, pr
-       rts
-        mov.l  @r15+, r12
-       .align  2
-0:
-       .long   _GLOBAL_OFFSET_TABLE_
-#else
-       jmp     @r1
-        mov    r0, r4
-#endif
 .L1:
        .word   -ENOSYS
 .L3:   .word   __NR_vfork
@@ -78,37 +57,14 @@ ENTRY (__vfork)
        shad    r2, r1
        not     r1, r1                  // r1=0 means r0 = -1 to -4095
        tst     r1, r1                  // i.e. error in linux
-       bf      1f
-       mov.l   .L2, r1
-#ifdef SHARED
-       mov     r0, r4
-       mov.l   r12, @-r15
-       sts.l   pr, @-r15
-        mov.l  0f, r12
-       mova    0f, r0
-       add     r0, r12
-       mova    .L2, r0
-       add     r0, r1
-       jsr     @r1
-        nop
-       lds.l   @r15+, pr
-       rts
-        mov.l  @r15+, r12
-       .align  2
-0:
-       .long   _GLOBAL_OFFSET_TABLE_
-#else
-       jmp     @r1
-        mov    r0, r4
-#endif
-       .align  2
-.L2:
-       .long   PLTJMP(C_SYMBOL_NAME(__syscall_error))
-1:
+       bf      .Lpseudo_end
+.Lsyscall_error:
+       SYSCALL_ERROR_HANDLER
+.Lpseudo_end:
        rts
         nop
 
 PSEUDO_END (__vfork)
-strong_alias (__vfork, __GI___vfork)
+libc_hidden_def (__vfork)
 
 weak_alias (__vfork, vfork)