<div dir="ltr"><div class="gmail_extra">On Fri, Apr 5, 2013 at 5:06 PM, Owen Anderson <span dir="ltr"><<a href="mailto:resistor@mac.com" target="_blank">resistor@mac.com</a>></span> wrote:</div><div class="gmail_extra">
...<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Clang's -fsanitize=integer-divide-by-zero option seems to provide what you want.  See the Clang User Manual: <a href="http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation" target="_blank">http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation</a></div>
<span class="HOEnZb"><font color="#888888"><div><br></div></font></span></div></blockquote><div><br></div><div style>That looks pretty close. I assume there are performance penalties for the runtime checks?</div><div style>
<br></div><div style>I would really like to produce the actual sdiv/udiv instruction and allow the processor to fault on it. That seems like the right fix to me.</div><div style><br></div><div style>-Cameron</div></div></div>
</div>