This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/N, MPX, x86_64] Intel MPX support in glibc for x86_64
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: "Zamyatin, Igor" <igor dot zamyatin at intel dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Mon, 7 Apr 2014 15:26:05 -0700
- Subject: Re: [PATCH 1/N, MPX, x86_64] Intel MPX support in glibc for x86_64
- Authentication-results: sourceware.org; auth=none
- References: <0EFAB2BDD0F67E4FB6CCC8B9F87D756942972119 at IRSMSX101 dot ger dot corp dot intel dot com> <CAMe9rOrn2WF0A-f_CHPZCO0vMxvsBfA4aUuuLi-VhYWjAA0vpg at mail dot gmail dot com> <CAMe9rOqekpkRvG4QakwZgLHpoOAJOSvobnZsssZHZ8-7=Mbbpg at mail dot gmail dot com> <CAMe9rOp0sLF2JsPSLA-K8weJPygJ2aEpSNRoUP1fm7v8-zWydQ at mail dot gmail dot com> <20140401182916 dot 192067449A at topped-with-meat dot com> <CAMe9rOo=Vu_KSitiRp6k09kjm+QT2XgOw7Wkfz_6cFPTuneDHg at mail dot gmail dot com> <CAMe9rOrVnG+wuP8nkm9GWFPPQ187xOJht31HuUv_73d27BqsBA at mail dot gmail dot com>
On Wed, Apr 2, 2014 at 10:44 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Apr 1, 2014 at 12:43 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Tue, Apr 1, 2014 at 11:29 AM, Roland McGrath <roland@hack.frob.com> wrote:
>>> Can you use some macros for the stack offset constants? There are too many
>>> magic numbers and too much undescribed arithmetic in that code already.
>>> That should be able to consolidate the #ifdef __ILP32__ into one spot.
>>>
>>
>> This patch defines REGISTER_SAVE_AREA to specify area on stack
>> to save/restore registers used in parameter passing. I didn't add stack
>> offset macros for individual registers. I can submit a separate patch if
>> it is desired.
>>
>> Any feedbacks on this patch?
>>
>
> It turns out that we can align 16-byte bound register save area to
> 16 bytes. This patch defines REGISTER_SAVE_XXX for each
> register and align bound register save area to 16 bytes.
>
> Any comments?
>
> Thanks.
>
>
> --
> H.J.
>
> --
> 2014-04-02 Igor Zamyatin <igor.zamyatin@intel.com>
> H.J. Lu <hongjiu.lu@intel.com>
>
> * config.h.in (HAVE_MPX_SUPPORT): New #undef.
> * sysdeps/x86_64/configure.ac: Set HAVE_MPX_SUPPORT.
> * sysdeps/x86_64/configure: Regenerated.
> * sysdeps/x86_64/dl-trampoline.S (REGISTER_SAVE_AREA): New
> macro.
> (REGISTER_SAVE_RAX): Likewise.
> (REGISTER_SAVE_RCX): Likewise.
> (REGISTER_SAVE_RDX): Likewise.
> (REGISTER_SAVE_RSI): Likewise.
> (REGISTER_SAVE_RDI): Likewise.
> (REGISTER_SAVE_R8): Likewise.
> (REGISTER_SAVE_R9): Likewise.
> (REGISTER_SAVE_BND0): Likewise.
> (REGISTER_SAVE_BND1): Likewise.
> (REGISTER_SAVE_BND2): Likewise.
> (_dl_runtime_resolve): Use them. Save and restore Intel MPX
> bound registers when calling _dl_fixup.
I will check it in if there are no objections in 48 hours.
Thanks.
--
H.J.