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] |
While looking a customers found a number of problems with generic implementation of log() and __ieee754_log(). First the macros that do extended precision (double double) arithmetic use a ABS macro from gmp-impl.h #define ABS(x) (x >= 0 ? x : -x) This is unfortunate since PowerPC has a hardware fabs instruction but GCC does not recognize the pattern and generates fcmpu/bc/fmr sequences (instead of fabs instructions). This patch redefines ABS(x) as __builtin_fabs(x). Also the call out to __isnan() in the posix wrapper code (w_log()) was showing up hot in the profiles. So I added --with-cpu=[power4|power6] implementations that effectively in-line the isnan() test within __log().
Attachment:
ppc-log-20080303.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |