diff options
author | mirabilos <tg@mirbsd.org> | 2015-07-24 22:18:07 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2015-08-02 10:44:01 +0200 |
commit | fb1802d9b238ecb7066ab0867d8c4c3c3acefaea (patch) | |
tree | f8aebf437a6e06529b80a29683a60a477623cbf0 /libc/sysdeps | |
parent | d8e6976a83cdd0ecac260de3afcb1973db8dffb0 (diff) |
integrate old m68k vfork bugfix of pre-µClibc-ng tree
Diffstat (limited to 'libc/sysdeps')
-rw-r--r-- | libc/sysdeps/linux/m68k/vfork.S | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/m68k/vfork.S b/libc/sysdeps/linux/m68k/vfork.S index b2fe03377..bde9d5a3a 100644 --- a/libc/sysdeps/linux/m68k/vfork.S +++ b/libc/sysdeps/linux/m68k/vfork.S @@ -22,20 +22,23 @@ __vfork: movl %sp@+, %a1 /* save the return address for later */ movl IMM __NR_vfork,%d0 trap #0 - movl IMM -4097, %d1 - cmpl %d0, %d1 - bcs fix_errno - jmp %a1@ /* don't return, just jmp directly */ -fix_errno: - negl %d0 + movl %a1, -(%sp) + + cmpil #-4096,%d0 + blss 1f + + neg.l %d0 #ifndef __PIC__ /* needs handling as the other archs */ movl errno, %a0 #else movl errno@GOT(%a5), %a0 #endif movl %d0, %a0@ - movl IMM -1, %d0 - jmp %a1@ /* don't return, just jmp directly */ + move.l #-1, %d0 + +1: + move.l %d0, %a0 + rts .size __vfork,.-__vfork weak_alias(__vfork,vfork) |