From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-apps@cygwin.com
Subject: Re: AVX on Cygwin
Date: Fri, 27 Nov 2015 09:37:00 -0000 [thread overview]
Message-ID: <20151127093748.GA16698@calimero.vinschen.de> (raw)
In-Reply-To: <20151127093227.GA25325@calimero.vinschen.de>
[-- Attachment #1: Type: text/plain, Size: 2201 bytes --]
On Nov 27 10:32, Corinna Vinschen wrote:
> Hi Achim,
>
> On Nov 26 19:17, Achim Gratz wrote:
> >
> > You may have noted that the recent gmp update makes problems on some
> > machines and two of the three reports come from Broadwell CPU. There is
> > one thing that did indeed change with the update and that is use of the
> > AVX ADC instruction on Broadwell/Skylake. Is it possible that somehow
> > the stack model or some register save/restore is different on Cygwin
> > that would produce that problem? I can only test on SandyBridge and
> > IvyBridge for Intel and these have no problem.
>
> Prior to the invention of the AVX stuff, a thread context structure had
> a fixed size. To hold AVX registers, the context structure became a
> variable sized struct which has to be initialized with the function
> InitializeContext(). It also requires an additional call to
> SetXStateFeaturesMask() before being able to call GetThreadContext().
> None of that is implemanted in Cygwin.
>
> The affected scenarios are:
>
> - sigdelayed, the function handling delayed signals, does not handle
> AVX registers, This potentially affects almost all system calls.
>
> - setjmp/longjmp
>
> - Saving and restoring thread contexts during signal handling or
> in the setcontext/getcontext/swapcontext/makecontext calls
> use the CONTEXT_FULL flag which omits AVX registers.
>
> - The mcontext_t structure has no provisions to hold AVX registers
> so they are not available in SA_SIGINFO signal handlers.
>
> The problem with all of that is that the exposed structures are fixed
> sized and have no room for extension without breaking the ABI.
>
> So adding AVX register support is quite some work, especially in the
> assembler code in the gendef script. For that, I'd need help.
> Fortunately there are not so many calls exposing contexts, only the
> aforemetioned ones.
>
> I hope this affects 64 bit only?
Btw., for the time being it might be prudent to disable AVX in gmp...
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-11-27 9:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 18:18 Achim Gratz
2015-11-27 9:32 ` Corinna Vinschen
2015-11-27 9:37 ` Corinna Vinschen [this message]
2015-11-27 9:57 ` Corinna Vinschen
2015-11-27 19:33 ` Achim Gratz
2015-11-27 20:39 ` Corinna Vinschen
2015-11-27 21:29 ` Achim Gratz
2015-11-28 10:12 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151127093748.GA16698@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).