<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Glyphy demo throws unhandled Integer division by zero exception"
href="https://bugs.freedesktop.org/show_bug.cgi?id=83570#c13">Comment # 13</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Glyphy demo throws unhandled Integer division by zero exception"
href="https://bugs.freedesktop.org/show_bug.cgi?id=83570">bug 83570</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>(In reply to <a href="show_bug.cgi?id=83570#c12">comment #12</a>)
<span class="quote">> Roland,
> Perhaps you can help me here. I'm looking at udiv_emit_cpu and I'm just
> not getting it. The comment says:
>
> /* udiv by zero is guaranteed to return 0xffffffff */
>
> but the way I read it, udiv by zero returns the numerator. Am I missing
> something?</span >
Well in the end it is "ored" with the comparison mask, hence it's going to be
all ones (comparison masks are either all ones or all zeros). So the first or
is there to make sure the zero in the division gets replaced by something else
(all ones because this is easiest) so it doesn't crash, and the second or is
there to make sure the result is all ones (because d3d10 requires this result,
but since d3d10 lacks signed integer division there's not really any such
requirement for idiv).</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>