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: Define __FPMATH_387__ and __FPMATH_SSE__


On 3/2/06, H. J. Lu <hjl@lucon.org> wrote:
> On Thu, Mar 02, 2006 at 04:08:54PM +0100, Richard Guenther wrote:
> > On 3/2/06, H. J. Lu <hjl@lucon.org> wrote:
> > > With this patch:
> > >
> > > http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01877.html
> > >
> > > gcc no longer mixes SSE and x387 math by default. However glibc
> > > still assumes gcc mixes SSE and x387 math. The x86-64 FP control
> > > routines in glibc change both SSE and x387 units, which is no
> > > longer necessary with the newer gcc. But glibc has no way to know
> > > if gcc mixes SSE and x387 math. I am proposing to define
> > > __FPMATH_387__ if x387 math is used and define __FPMATH_SSE__ if
> > > SSE math is used, respectively. If 2 units are used, both will
> > > be defined. Glibc can have sets math unit control routines and
> > > only call the ones be using.
> >
> > Which routines are you referring to?  I can only find
> > sysdeps/x86_64/fpu_control.h
> > which only touches x387 unit.  I think it would make sense to add gcc builtins
> > for status/control word changes, though.
>
> Check <fenv.h> and sysdeps/x86_64/fpu. There are a whole bunch of them.

I see.  But this is not in functions inlined into user code, but only
compiled into
the library, right?  Also for things like fesetround, it still needs
to touch x387
flags for XFmode long long operations.

Richard.


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