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] Save fp registers on x64 function resolution.


On Fri, 26 Jul 2013, Ondrej Bilka wrote:

> Hi, as having to manually save xmm registers causes many issues recently
> (memset issues, bug 15786...) this patch save xmm registers. If you
> accept it to 2.19 further cleanups will follow. 
> 
> We could also add register saving for other architectures.

Could you please give a proper self-contained explanation of what the 
issue is so that architecture maintainers can tell whether it is relevant 
to their architecture or not?

For example, if the issue is that IFUNC resolvers may clobber 
call-clobbered registers also used for passing arguments, and the fix 
requirement is that on all IFUNC-supporting architectures the dynamic 
linker must save and restore those registers around calls to the IFUNC 
resolvers (or, as here, around a call to _dl_fixup), why isn't it 
generically an issue for all C code in the dynamic linker, not just for 
IFUNC resolvers?  Shouldn't it always be the case, on all architectures, 
that call-clobbered registers used for passing arguments need to be saved 
and restored around dynamic linker entry points (not just in 
_dl_runtime_resolve but also in _dl_runtime_profile around calls to 
_dl_profile_fixup, and in dl-tlsdesc.S around calls to the TLS descriptor 
lazy resolver functions)?  Is this about registers that are considered in 
some way unlikely to be used by the C code in the dynamic linker?

(Registers used for passing arguments of course includes e.g. vector 
registers used only conditionally for passing arguments of certain vector 
types, so in various cases dynamic checks for such registers' existence 
may be needed in the dynamic linker.)

-- 
Joseph S. Myers
joseph@codesourcery.com


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