On 10/22/13 13:12, Richard Henderson wrote:
On 10/21/2013 11:10 AM, Jeff Law wrote:
So why are bounds distinct modes?    Is there some inherent reason why bounds
are something other than an integer mode (MODE_INT)?

I suggested the distinct modes during the NDA phase.

The primary reason for this is that MPX is designed to be kind of
backward compatible with previous ISAs, operating as nops.  Thus
we cannot allow the compiler to use the MPX registers for anything
besides implementing the bounds checking.
Right.


The only way I could think to positively ensure that normal operations
didn't get implemented via mpx insns is to describe the new patterns
with distinct modes.
Presumably once we have a distinct mode, we do the right magic in HARD_REGNO_MODE_OK and that's how you get your guarantee. I'm assuming we're exposing these to the register allocator (I haven't looked at the full series yet).

Presumably you need a distinct mode coming out of the front-end/gimple to ensure we get the new mode in RTL.

It all seems reasonable -- I wasn't asking Ilya to change anything, I'm just trying to understand the rationale before going any further with the patch and this helps considerably.


jeff

Reply via email to