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: Should we compile x86-64 ld.so with -mno-sse -mno-sse?


On Fri, Nov 02, 2012 at 12:20:08AM -0700, H.J. Lu wrote:
> >> But it will introduce extra over head for every symbol lookup
> >> and it wouldn't be forward compatible with AVX since we would
> >> only save/restore 128bit SSE registers, not 256bit AVX registers.
> >
> > I'm confused what the issue is. As far as I know, the SSE/AVX
> > registers are not call-saved, they're call-clobbered. As such, it
> > makes no difference what you do with them in the dynamic linker.
> >
> > Source: x86_64 psABI (http://www.x86-64.org/documentation/abi.pdf),
> > 3.2.1 Registers and the Stack Frame.
> >
> 
> SSE registers are used to pass function parameters.  When calling
> function foo, ld.so will perform symbol lookup up before branching
> to foo.  If ld.so trashes SSE registers, foo will get garbage as
> function parameters.

Oh, so this is just for the code that performs lazy relocations. I
see.

Rich


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