<div dir="ltr"><div class="gmail_default" style="font-size:small"></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-15 16:55 GMT-02:00 Paulo Pinto via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span>:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">On Monday, 15 December 2014 at 16:30:14 UTC, Ola Fosheim Grøstad wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Any thoughts on how the upcoming hardware supported bounds checking from Intel will affect D?<br>
<br>
<a href="http://en.wikipedia.org/wiki/Intel_MPX" target="_blank">http://en.wikipedia.org/wiki/<u></u>Intel_MPX</a><br>
<br>
Chapter 9 in:<br>
<br>
<a href="https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf" target="_blank">https://software.intel.com/<u></u>sites/default/files/managed/<u></u>0d/53/319433-022.pdf</a><br>
</blockquote>
<br></div></div>
Interesting, given that bounds checking support is an old feature<br>
<br>
<a href="http://x86.renejeschke.de/html/file_module_x86_id_18.html" target="_blank">http://x86.renejeschke.de/<u></u>html/file_module_x86_id_18.<u></u>html</a><br>
<br>
If I remember my Assembly days in the 90's BOUND was slower than doing the check explicitly.<br>
<br>
I guess now it is way faster and the MMU is doing it instead.<br></blockquote><div><br><br><div class="gmail_default" style="font-size:small">​Actually, MPX provides a complete infra-structure for bounds-checking, including special-purpose registers (4 of them), a bounds directory/tables for storing/loading linearized pointer addresses, specific instructions to independently make/check upper/lower bounds, and even modified versions of call/ret/jump. <br></div><br><div class="gmail_default" style="font-size:small">​They are working in the ABI level so calling conventions can benefit from it. Although MPX currently supports only statically allocated arrays, a memory-protected version of glibc is on the way​: <a href="https://software.intel.com/en-us/blogs/2013/07/22/intel-memory-protection-extensions-intel-mpx-support-in-the-gnu-toolchain">https://software.intel.com/en-us/blogs/2013/07/22/intel-memory-protection-extensions-intel-mpx-support-in-the-gnu-toolchain</a><br></div><br><div class="gmail_default" style="font-size:small">​I've tried out the MPX-enabled GCC version and it looks pretty cool.<br></div>​<br>--<br><div class="gmail_default" style="font-size:small;display:inline">​Leandro​<br><br></div></div></div></div></div>