<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Done. r184497.<br><div><div>On Jun 20, 2013, at 3:59 PM, Michael Gottesman <<a href="mailto:mgottesman@apple.com">mgottesman@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Of course = ).<div><br></div><div>Michael</div><div><br><div><div>On Jun 20, 2013, at 3:06 PM, Eli Friedman <<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr">On Thu, Jun 20, 2013 at 3:05 PM, Eli Friedman<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="ltr"><div><div class="h5">On Thu, Jun 20, 2013 at 2:39 PM, Michael Gottesman<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:mgottesman@apple.com" target="_blank">mgottesman@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;"><br><div><div><div>On Jun 20, 2013, at 2:16 PM, Eli Friedman <<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>> wrote:</div><br><blockquote type="cite"><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div dir="ltr">On Tue, Jun 18, 2013 at 3:11 PM, Michael Gottesman<span> </span><span dir="ltr"><<a href="mailto:mgottesman@apple.com" target="_blank">mgottesman@apple.com</a>></span><span> </span>wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">Hello cfe commits!<br><br>The attached patch adds checked-arithmetic builtins to ameliorate such code in security critical applications (for instance webkit). It simply exposes {u,s}{add,sub,mul}.<br><br>*NOTE* The u{add,sub} overlaps with the multi precision built-ins. I decided to add in the additional builtin since users are going to see s{add,sub} and look for u{add,sub}. We could add in a Builtins.h header where I could implement the checked arithmetic with the multi precision arithmetic builtins but I felt that was a bigger change than this.<br><br></blockquote><div><br></div><div>It looks like you copy-pasted some stuff you didn't mean to in the changes to LanguageExtensions.rst.</div></div></div></div></div></blockquote><div><br></div></div><div>= /. Fixed.</div><div><br><blockquote type="cite"><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><br></div></div><div class="gmail_extra"><div class="gmail_extra">+    return RValue::get(Builder.CreateZExt(Carry, X->getType()));</div><div><br></div><div>These builtins all return bool, right?  Why are you zero-extending here?  (You might be able to get away with this in C because of integer promotions, but I'm pretty sure it'll explode in C++.)</div></div></div></div></blockquote><div><br></div></div><div>= /. Fixed. The reason I was zero extending was that I was basing this off of the multiprecision builtin code and forgot to remove it. </div><div><br><blockquote type="cite"><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div dir="ltr"><div class="gmail_extra"><div><br></div><div>IIRC, we don't actually support CodeGen of llvm.smul.with.overflow with 64-bit operands on x86-32; it would be nice to print a proper error message instead of crashing.  (At least, we didn't at one point; I don't recall if it ever got fixed.)</div></div></div></div></blockquote><div dir="auto"><br></div></div><div dir="auto">I just codegened my test file on OS X with -arch i386 and it codegened fine. So it looks like it was fixed.</div><br></div><div>Hows this look:</div><div></div></div></blockquote></div><br></div><div class="gmail_extra"><br></div></div></div><div class="gmail_extra">LGTM.</div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra"></div></font></span></div></blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Oh, one more thing I forgot: please put a note into the release notes.</div><div class="gmail_extra"><br></div><div class="gmail_extra">-Eli</div></div></div></blockquote></div><br></div></div>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></blockquote></div><br></body></html>