This is the mail archive of the gcc-patches@gcc.gnu.org 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


On Fri, Sep 13, 2013 at 4:36 PM, H.J. Lu <hjl.tools@gmail.com> wrote:

>>> Did you check the above with x32, where Pmode != word_mode on x86_64?
>>> The inner UNSPEC will be generated in SImode, but the matching pattern
>>>
>>> +(define_insn "*<mode>_mk"
>>> +  [(set (match_operand:BND 0 "register_operand" "=B")
>>> +    (unspec:BND
>>> +      [(match_operator:<bnd_ptr> 3 "bnd_mem_operator"
>>> +        [(unspec:<bnd_ptr>
>>> +       [(match_operand:<bnd_ptr> 1 "register_operand" "r")
>>> +            (match_operand:<bnd_ptr> 2 "address_mpx_no_base_operand" "Tb")]
>>> +       UNSPEC_BNDMK_ADDR)])]
>>> +      UNSPEC_BNDMK))]
>>> +  "TARGET_MPX"
>>>
>>> will have inner UNSPEC in DImode, due to:
>>>
>>> +;; Bound modes.
>>> +(define_mode_iterator BND [(BND32 "!TARGET_64BIT") (BND64 "TARGET_64BIT")])
>>> +
>>> +;; Pointer mode corresponding to bound mode.
>>> +(define_mode_attr bnd_ptr [(BND32 "SI") (BND64 "DI")])
>>
>> Currently we do not support MPX instrumentation for x32 and therefore
>> I did not check these expands work correctly for x32. I believe the
>> only possible problem here is BND iterator definition which does not
>> care about x32. Following declaration should make everything work
>> fine:
>>
>
> Since MPX spec doesn't support x32, MPX should be disallowed
> with x32.

OK, please error out when this invalid combination is detected.

Uros.


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