diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-04-18 02:51:26 +0100 |
---|---|---|
committer | Petr Baudis <pasky@ucw.cz> | 2011-05-27 00:34:37 +0200 |
commit | 8277fdc1cd54428e54e112db7f5be89303951001 (patch) | |
tree | c57104842eda4298e94781c1c033823f120b0075 /sysdeps | |
parent | fea332e16416691310088b5c0e6797694c88352b (diff) | |
download | glibc-8277fdc1cd54428e54e112db7f5be89303951001.tar.gz glibc-8277fdc1cd54428e54e112db7f5be89303951001.tar.xz glibc-8277fdc1cd54428e54e112db7f5be89303951001.zip |
Fix FPU context handling in getcontext on x86-64.
fnstenv on x86-64 seems to clear the state. Work around. (cherry picked from commit 75ea32abcde4e1699328354e1804ea94560d2950)
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/getcontext.S | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/getcontext.S b/sysdeps/unix/sysv/linux/x86_64/getcontext.S index 4bbc7a4d2e..1a31d72dad 100644 --- a/sysdeps/unix/sysv/linux/x86_64/getcontext.S +++ b/sysdeps/unix/sysv/linux/x86_64/getcontext.S @@ -1,5 +1,5 @@ /* Save current context. - Copyright (C) 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2005, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>, 2002. @@ -62,6 +62,7 @@ ENTRY(__getcontext) movq %rcx, oFPREGS(%rdi) /* Save the floating-point environment. */ fnstenv (%rcx) + fldenv (%rcx) stmxcsr oMXCSR(%rdi) /* Save the current signal mask with |