Patch for missing sinf, cosf, ...

Branko Branko
Fri Jun 9 01:19:00 GMT 2000


Here's the stat:

Builtin cos and sin are expanded only when -ffast-math; from
gcc/builtins.c:expand_builtin:

    case BUILT_IN_SIN:
    case BUILT_IN_COS:
      /* Treat these like sqrt, but only if the user asks for them.  */
      if (! flag_fast_math)
        break;
    case BUILT_IN_FSQRT:
      target = expand_builtin_mathfn (exp, target, subtarget);
      if (target)
        return target;
      break;

So we need out-of-line implementations of sin{f,l} and cos{f,l}.
__builtin_sqrt seems to generate a library call when the inline
expansion generates a NaN; so we need out-of-line sqrt{f,l}, too.

fabs doesn't seem to have these problems; that bit can be removed.

    Brane

-- 
Branko Čibej                 <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
voice: (+386 1) 586 53 49     fax: (+386 1) 586 52 70


More information about the Libstdc++ mailing list