Ignore:
Timestamp:
Mar 21, 2006, 10:48:02 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Use the asm versions of sin and cos when available.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/kernel/kernel.c

    r617 r652  
    228228{
    229229    double ret = 0.0;
     230#ifdef HAVE_FSIN_FCOS
     231    asm volatile("fcos" : "=t" (ret) : "0" (x));
     232#else
    230233    double x2;
    231234    double num = 1.0;
     
    243246        fact *= (2 * i + 1) * (2 * i + 2);
    244247    }
    245 
     248#endif
    246249    return ret;
    247250}
     
    250253{
    251254    double ret = 0.0;
     255#ifdef HAVE_FSIN_FCOS
     256    asm volatile("fsin" : "=t" (ret) : "0" (x));
     257#else
    252258    double x2;
    253259    double num;
     
    266272        fact *= (2 * i + 2) * (2 * i + 3);
    267273    }
    268 
     274#endif
    269275    return ret;
    270276}
Note: See TracChangeset for help on using the changeset viewer.