This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, i386, MPX, 1/X] Support of Intel MPX ISA. 1/2 Bound type and modes

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.

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]