This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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 1/N, MPX, x86_64] Intel MPX support in glibc for x86_64


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.


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