This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Re: Linux: FPU control word not set when __fpu_control == _dl_fpu_control.


> > For static binaries, we don't get AT_FPUCW and therefore always call
> > __setfpucw.  But for shared binaries we can be clever and avoid the
> > initilisation.
> 
> Why would you care to avoid this initialization?  It seems like a one time thing
> with very little cost.

The cost is pretty high. It means any program no matter if it will use FPU
or not actually touches the FPU unit. On many machines this means a trap
into the kernel which has to initialize the whole FPU and give it to the
application and on several archs on the next context switch you have no way
to find out nothing else in the FPU state was modified, so you have to save
it.

Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.47 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________

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