_bnd_narrow_ptr_bounds
Classification
Other, Miscellaneous, CPUID Test: MPX
Header File
Synopsis
_bnd_narrow_ptr_bounds(const void * q, const void * r, size_t size);
Description
Narrow the bounds for pointer "q" to the intersection of the bounds of "r" and the bounds ["q", "q" + "size" - 1], and store the result in "dst".
Operation
dst := q
IF r.LB > (q + size - 1) OR r.UB < q
dst.LB := 1
dst.UB := 0
ELSE
dst.LB := MAX(r.LB, q)
dst.UB := MIN(r.UB, (q + size - 1))
FI