1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-30 12:04:07 +00:00

On powerpc, calculate s_scale using the non-FP version previously

specific to hp300. Since FreeBSD does not support hp300, hp300 has
been removed from the condition altogether.

The FP version broke profiling on powerpc due to invalid results.
Casting to double instead of float resolved the issue, but with
Book-E not having a FP unit, the non-FP version looked preferrable.
Note that even on AIM hardware the FP version yielded an invalid
value for s_scale, so the problem is most likely with the compiler
or with the expression itself.
This commit is contained in:
Marcel Moolenaar 2010-06-30 01:40:25 +00:00
parent 1fa9ef23cc
commit c5e0ba5fe4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=209604

View File

@ -111,7 +111,7 @@ monstartup(lowpc, highpc)
o = p->highpc - p->lowpc;
if (p->kcountsize < o) {
#ifndef hp300
#if !defined(__powerpc__)
s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;
#else /* avoid floating point */
int quot = o / p->kcountsize;