<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - lp_test_arit fails on non-sse41 capable machines, breaking make check"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=59701#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - lp_test_arit fails on non-sse41 capable machines, breaking make check"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=59701">bug 59701</a>
              from <span class="vcard"><a class="email" href="mailto:sroland@vmware.com" title="Roland Scheidegger <sroland@vmware.com>"> <span class="fn">Roland Scheidegger</span></a>
</span></b>
        <pre>I'm wondering if something like this (in horrible pseudo-code) would be a
solution (for ifloor):
xtruncint = fptoint(x)
xtrunc = inttofp(xtruncint)
mask = xtrunc > x
maskone = mask & 1
xintfloor = xtruncint - maskone;

I think this might work for all values as long as they don't exceed integer
range, including negative zero as long as cmp(negzero, poszero) equals true
which I think it should. It has also similar complexity as what we're doing
now.
For floor() if you'd also want it to work with huge exponents I think you'd
need to additionally compare the original number (with masked out sign bit)
with 2^24 and if it's larger just use the original value (which will already
represent an exact integer in this case) using some select (given that you
didn't have round in the first place meaning another and/andnot/or).
For NaNs etc. the results will probably remain pretty unpredictable unless you
check for those as well but that's probably getting silly.
Honestly I don't know if it's worth fixing this.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>