]> sourceware.org Git - glibc.git/commitdiff
Initialize %fs, %gs, and floating-point status as well.
authorUlrich Drepper <drepper@redhat.com>
Tue, 24 Jul 2001 06:48:43 +0000 (06:48 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 24 Jul 2001 06:48:43 +0000 (06:48 +0000)
sysdeps/unix/sysv/linux/i386/makecontext.S

index 56b5537ce3abe0e7bed62d7af7a08eaa19d4f2c8..1ca323394555f164c9fe16e3fb25b0170a2ce076 100644 (file)
@@ -40,6 +40,22 @@ ENTRY(__makecontext)
        movl    oLINK(%eax), %ecx
        movl    %ecx, -4(%edx)
 
+       /* Copy the FS and GS segment register.  */
+       xorl    %ecx, %ecx
+       movw    %gs, %cx
+       movl    %ecx, oGS(%eax)
+       xorl    %ecx, %ecx
+       movw    %fs, %cx
+       movl    %ecx, oFS(%eax)
+
+       /* We have separate floating-point register content memory on the
+          stack.  We use the __fpregs_mem block in the context.  Set the
+          links up correctly.  */
+       leal    oFPREGSMEM(%eax), %ecx
+       movl    %ecx, oFPREGS(%eax)
+       /* Save the floating-point context.  */
+       fnstenv (%ecx)
+
        /* Remember the number of parameters for the exit handler since
           it has to remove them.  We store the number in the EBX register
           which the function we will call must preserve.  */
This page took 0.044495 seconds and 5 git commands to generate.