From 75ea32abcde4e1699328354e1804ea94560d2950 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 17 Apr 2011 21:51:26 -0400 Subject: Fix FPU context handling in getcontext on x86-64. fnstenv on x86-64 seems to clear the state. Work around. --- sysdeps/unix/sysv/linux/x86_64/getcontext.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysdeps') 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 , 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 -- cgit v1.2.3