From 249059b70e4fe1ea3368a092e1b0f57571f58e55 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 27 Jan 2014 20:53:02 +0000 Subject: [PATCH] * gendef (_setjmp (x86)): Save FPU control word location in sequential location. Adjust sigstack save accordingly. (_longjmp (x86)): Ditto for restore. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/gendef | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 43c4fe86a..f96e8f0dc 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2014-01-27 Christopher Faylor + + * gendef (_setjmp (x86)): Save FPU control word location in sequential + location. Adjust sigstack save accordingly. + (_longjmp (x86)): Ditto for restore. + 2014-01-27 Corinna Vinschen * gendef (sigdelayed (x86_64)): Save and restore FPU control word. diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef index fc033b530..a7c036f61 100755 --- a/winsup/cygwin/gendef +++ b/winsup/cygwin/gendef @@ -771,13 +771,13 @@ _setjmp: movw %ax,42(%edi) movl %fs:0,%eax movl %eax,44(%edi) - fnstcw 56(%edi) + fnstcw 48(%edi) pushl %ebx call stabilize_sig_stack movl $tls::stackptr(%ebx),%eax # save stack pointer contents decl $tls::stacklock(%ebx) popl %ebx - movl %eax,48(%edi) + movl %eax,52(%edi) popl %edi movl \$0,%eax leave @@ -859,7 +859,7 @@ _longjmp: movl %esp,%ebp movl 8(%ebp),%edi # address of buffer call stabilize_sig_stack - movl 48(%edi),%eax # get old signal stack + movl 52(%edi),%eax # get old signal stack movl %eax,$tls::stackptr(%ebx) # restore decl $tls::stacklock(%ebx) # relinquish lock xorl %eax,%eax @@ -875,7 +875,7 @@ _longjmp: pushfl popl %ebx fninit - fldcw 56(%edi) + fldcw 48(%edi) movl 44(%edi),%eax movl %eax,%fs:0 movw 42(%edi),%ax