From 7f833eba90a4ff7e73410143f8f687dca393550e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 21 Jan 1999 09:46:25 +0000 Subject: [PATCH] Optimise a little, support 26-bit machines correctly and fix check for returned errors. --- sysdeps/unix/sysv/linux/arm/clone.S | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index 728d62f3e3d..46359e83623 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Pat Beirne @@ -45,20 +45,17 @@ ENTRY(__clone) mov r0, r2 @ new sp is already in r1 swi SYS_ify(clone) - cmp r0, #0 - blt PLTJMP(syscall_error) - beq thread_start - @ else, thread was launched... - mov pc, lr + cmn a1, $4096 + bhs PLTJMP(C_SYMBOL_NAME(__syscall_error)) + RETINSTR(movne,pc,lr) -thread_start: @ pick the function arg and call address off the stack and execute ldr r0, [sp, #4] mov lr, pc ldr pc, [sp] @ and we are done, passing the return value through r0 - bl PLTJMP(_exit) + b PLTJMP(_exit) PSEUDO_END (__clone) -- 2.47.3