X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/b0d623f7f2ae71ed96e60569f61f9a9a27016e80..7e41aa883dd258f888d0470250eead40a53ef1f5:/tools/tests/libMicro/log.c?ds=sidebyside diff --git a/tools/tests/libMicro/log.c b/tools/tests/libMicro/log.c index 0b4605f3f..71910e079 100644 --- a/tools/tests/libMicro/log.c +++ b/tools/tests/libMicro/log.c @@ -53,9 +53,27 @@ int benchmark(void *tsd, result_t *res) { int i; + /* Added as part of the fix for radar 7508837 */ + double t = 0.0; for (i = 0; i < lm_optB; i += 10) { double value = i + .01; +#if 1 /* Apple added code, see radar 7508837 */ + t += log(value); + t += log(value + 1.0); + t += log(value + 2.0); + t += log(value + 3.0); + t += log(value + 4.0); + t += log(value + 5.0); + t += log(value + 6.0); + t += log(value + 7.0); + t += log(value + 8.0); + t += log(value + 9.0); + } + res->re_count = i; + + return ((int)(t - t)); +#else (void) log(value); (void) log(value); (void) log(value); @@ -70,4 +88,5 @@ benchmark(void *tsd, result_t *res) res->re_count = i; return (0); +#endif /* end of Apple fix */ }