about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/i386/getcontext.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/getcontext.S')
-rw-r--r--sysdeps/unix/sysv/linux/i386/getcontext.S10
1 files changed, 4 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/getcontext.S b/sysdeps/unix/sysv/linux/i386/getcontext.S
index ddc0f6f117..600a886863 100644
--- a/sysdeps/unix/sysv/linux/i386/getcontext.S
+++ b/sysdeps/unix/sysv/linux/i386/getcontext.S
@@ -43,13 +43,11 @@ ENTRY(__getcontext)
 	movl	%ecx, oESP(%eax)
 	movl	%ebx, oEBX(%eax)
 
-	/* Save the FS and GS segment register.  */
+	/* Save the FS segment register.  We don't touch the GS register
+	   since it is used for threads.  */
 	xorl	%edx, %edx
-	xorl	%ecx, %ecx
-	movw	%gs, %dx
-	movw	%fs, %cx
-	movl	%edx, oGS(%eax)
-	movl	%ecx, oFS(%eax)
+	movw	%fs, %dx
+	movl	%edx, oFS(%eax)
 
 	/* We have separate floating-point register content memory on the
 	   stack.  We use the __fpregs_mem block in the context.  Set the