<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 22.01.2021 19:01, Paul Gofman wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:85f90808-283e-0c48-d092-d2679784f7ff@codeweavers.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div class="moz-cite-prefix">On 1/22/21 20:51, Jacek Caban wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:d60d5248-31b7-c2ea-63b1-d52f3b408b4e@codeweavers.com">
        <meta http-equiv="Content-Type" content="text/html;
          charset=UTF-8">
        <div class="moz-cite-prefix">On 22.01.2021 18:44, Paul Gofman
          wrote:<br>
        </div>
        <blockquote type="cite"
          cite="mid:937810cd-ca31-c2b2-4a97-7c5c44c76c43@codeweavers.com">
          <blockquote type="cite" style="color: #007cff;">
            <pre class="moz-quote-pre" wrap="">What seems to be more interesting is xsaveopt, which I think could
make a difference. That would, however, need xsave are to be at
constant address. I've been thinking about storing it next to TEB, but
we can't do that as long as winsock is called on signal stack, so I
left experimenting with it for the future.

</pre>
          </blockquote>
          <pre class="moz-quote-pre" wrap="">xsavec also performs an optimization (doesn't save the xstate in initial
state),</pre>
        </blockquote>
        <p><br>
        </p>
        <p>As I said, xsave already does that optimization, there is no
          need for xsavec for that.<br>
        </p>
      </blockquote>
      <p>Are you sure? As I read the docs, there is no mention of xsave
        avoiding any saves (e. g., [1], [2]), and I probably even tested
        that (well, not 100% sure now_ xsave zeros the data while xsavec
        (expectedly) does not.:</p>
      <p>From 2 (savec):</p>
      <p>TO_BE_SAVED ← RFBM AND XINUSE;</p>
      <p>From 1:</p>
      <p>Only "RFBM ← XCR0 AND EDX:EAX;" is used as a flag controlling
        whether save is performed or not.</p>
    </blockquote>
    <p><br>
    </p>
    <p>Oh, right, I was confused by the fact that it does not set the
      bit in mask:</p>
    <p>XSTATE_BV field in XSAVE header ← (OLD_BV AND ~RFBM) OR (XINUSE
      AND RFBM);</p>
    <p><br>
    </p>
    <p>So it may be interesting if xsaveopt doesn't work out.</p>
    <p><br>
    </p>
    <p>Jacek<br>
    </p>
  </body>
</html>