aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S6
1 files changed, 5 insertions, 1 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S b/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S
index 9e348683f3..f68d40439e 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S
@@ -20,7 +20,11 @@
#define SAVE_PID \
movl %fs:PID, %esi; \
- movl $-1, %fs:PID
+ movl $0x80000000, %ecx; \
+ movl %esi, %edx; \
+ negl %edx; \
+ cmove %ecx, %edx; \
+ movl %edx, %fs:PID
#define RESTORE_PID \
testq %rax, %rax; \