This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386, MPX 1/X] Support of Intel MPX ISA
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, Areg Melik-Adamyan <areg dot melikadamyan at gmail dot com>
- Date: Fri, 13 Sep 2013 07:36:30 -0700
- Subject: Re: [PATCH, i386, MPX 1/X] Support of Intel MPX ISA
- Authentication-results: sourceware.org; auth=none
- References: <CAMbmDYZdrR8t66VtNPFxbz33mMX0M-tMj_Bv=uvrejui_YnVWg at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1307242237420 dot 5307 at digraph dot polyomino dot org dot uk> <CAMbmDYbNvPh8MiJkgx29Hc+d_czzLeFuxeG4uDz_AozqX3j1cg at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1307251415290 dot 18813 at digraph dot polyomino dot org dot uk> <CAMbmDYamg+jwEY6FiZ_+_DT8nqug58Gi5Nf2PSDZ26Bi17K5=A at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1308092323090 dot 30018 at digraph dot polyomino dot org dot uk> <CAMbmDYbzeg05JsEv2hWQwQHoDZLzfeWC9spz-XH_a0ZERcYBEw at mail dot gmail dot com> <CAMbmDYa6Vc9_c84ZMRzE3sUMH7B0=VtaumSXzWE6yDVZjsEhdA at mail dot gmail dot com> <CAMbmDYb2K+bm0n7N8xnuGDOVezBMVqD3NuAOu0Qyg0UwpQ+tWA at mail dot gmail dot com> <CAMbmDYa+PMNQJCvhPDsPb-o5iaxcJmCJE2JFyaqJYS+-HM56Vw at mail dot gmail dot com> <CAMbmDYb9eS4K4gwpA04vEoDWJ50HwwgP76FE5b1vn=SqNgdTnQ at mail dot gmail dot com> <CAFULd4Z1Fzur6oSMwXpJKoAtv1BGUX8LFPNjzFMM2Mi1sZUpPQ at mail dot gmail dot com> <CAMbmDYYn+B7PVA+bmvuqmAxF9ApR6kSxe84t0zTmW+55xHbsUw at mail dot gmail dot com>
On Fri, Sep 13, 2013 at 3:18 AM, Ilya Enkovich <enkovich.gnu@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.
--
H.J.