Hi, Here is a patch to extend x86-64 psABI to support MPX [1].
A short description of changes: - There are 4 bound registers (bnd0-bnd3) added; all of them are caller-save - When we pass (return) pointer on register, we use the next available bound register to pass (return) bounds - If there is no free bound register, use bounds table with special address - When pointer is passed on stack, bounds table is used to pass bounds - For vararg functions pass bounds for each arg ignoring its type; it allows to avoid problem of bounds mismatch when caller and callee use different types to pass/get arg. [1] http://software.intel.com/sites/default/files/319433-015.pdf Thanks, Ilya
MPX-ABI.patch
Description: Binary data