This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


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

Re: fixed check for sinl in acinclude.m4


On Fri, 23 Jun 2000, Benjamin Kosnik wrote:
>
> -> This is a builtin function with external library references
>    (sqrtf).  As you've noticed, yeah, it has some optimizations
>    (fsqrt), but the library reference really throws systematic
>    autoconf testing (see #2). If you can figure out how to allow this,
>    but not mark #2 (sinf) as builtin, I'm interested. I don't think
>    much more effort on this is going to be worthwhile though... 

  Thats why I think it should check the builtins against libm.  Together with
the new checks for the non builtins it should work correctly.

  case 1) the target completely inlines it (ie x86 fabsl).
HAVE_BUILTIN_FABSL is defined.  We use the builtin.

  case 2) the target has an instruction (x86 fsqrt) and has a call (sqrtl), the
function is in libm and declared in math.h. HAVE_BUILTIN_SQRTL, HAVE_SQRTL is
defined.  We use the builtin.

  case 3) the target has an instruction (x86 fsqrt) and has a call (sqrtl), but
the function isnt in libm (non glibc?).  HAVE_BUILTIN_SQRTL and HAVE SQRTL is
undefined.  We punt.

  case 3) the target doesnt have an instruction (or its not inlined) (x86 sinl)
and libm has the routine and its in math.h.  HAVE_BUILTIN_SINL, HAVE_SINL is
defined.  We use the builtin.

  case 4) the target doesnt inline and libm has the routine, but it isnt
declared in math.h (ppc sinl).  HAVE_BUILTIN_SINL is defined, but HAVE_SINL
is undefined.  We use the builtin.  It will still compile and link correctly.

  case 5) the target doesnt inline and libm doesnt have the routine (???).
HAVE_BUILTIN, HAVE whatever is undefined.  We punt.

  case 6) the compiler doesnt have a builtin, but its in libm and declared
in math.h (x86 acosl).  HAVE_BUILTIN_ACOSL is undefined, but HAVE_ACOSL
is defined.  We use the library call.

  case 7) the compile doesnt have a builtin, but its in libm but not declared in
math.h (ppc acosl).  HAVE_BUILTIN_ACOSL, HAVE_ACOSL is undefined.
we punt.

  case 8) the compiler doesnt have a builtin, its not in libm and its damn well
better not be declared in math.h (???). HAVE_BUILTIN, HAVE whatever is
undefined.  we punt.

is there anything I'm missing here?

 
-- 
Steven King
sxking@uswest.net

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