Intel MPX

via Digitalmars-d digitalmars-d at puremagic.com
Tue Dec 16 04:39:23 PST 2014


On Monday, 15 December 2014 at 18:55:42 UTC, Paulo Pinto wrote:
> Interesting, given that bounds checking support is an old 
> feature
>
> http://x86.renejeschke.de/html/file_module_x86_id_18.html
>
> If I remember my Assembly days in the 90's BOUND was slower 
> than doing the check explicitly.

Yes, and the BOUND instruction is deprecated and not available in 
64-bit mode. It was also rather primitive compared to MPX. MPX 
basically could make it possible for most C programs to bounds 
check pointers extensively, not only arrays. At least in debug 
builds.

> I guess now it is way faster and the MMU is doing it instead.

The instructions are explicit, so you need solid compiler 
support. But the lookup structure reminds me of how page-tables 
are structured. So I suppose Intel are leveraging the knowhow 
they have on MMU design when doing the implementation for MPX.


More information about the Digitalmars-d mailing list