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: RFC: Should x86-64 support arbitrary calling conventions?


On Mon, Mar 27, 2017 at 9:06 AM, Florian Weimer <fw@deneb.enyo.de> wrote:
> * H. J. Lu:
>
>> Even without IFUNC nor SSE in ld.so,  we still need to deal with
>>
>> RTLD_PREPARE_FOREIGN_CALL
>>
>> which may clobber vector registers.
>
> I think RTLD_PREPARE_FOREIGN_CALL is a no-op in current master.  It's
> never defined.

It was removed from x96-64 by

commit f3dcae82d54e5097e18e1d6ef4ff55c2ea4e621e
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Aug 25 04:33:54 2015 -0700

    Save and restore vector registers in x86-64 ld.so

    This patch adds SSE, AVX and AVX512 versions of _dl_runtime_resolve
    and _dl_runtime_profile, which save and restore the first 8 vector
    registers used for parameter passing.  elf_machine_runtime_setup
    selects the proper _dl_runtime_resolve or _dl_runtime_profile based
    on _dl_x86_cpu_features.  It avoids race condition caused by
    FOREIGN_CALL macros, which are only used for x86-64.

    Performance impact of saving and restoring 8 vector registers are
    negligible on Nehalem, Sandy Bridge, Ivy Bridge and Haswell when
    ld.so is optimized with SSE2.


-- 
H.J.


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