svn commit: r209604 - head/lib/libc/gmon

David Schultz das at FreeBSD.ORG
Fri Jul 2 22:16:40 UTC 2010


On Wed, Jun 30, 2010, Marcel Moolenaar wrote:
> >> 		s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;
> > 
> > I can't see any bugs in this expression.  p->kcountsize is < o,  and the
> > scale factor is only 65536, so there should be no problems with overflow.
> 
> This leaves GCC a the problem. 

What does the generated assembly look like, and what are the
inputs that screw up?  PowerPC doesn't have an instruction to
convert integer types to floats, so that's done in software.  The
hardest/most esoteric is the conversion from a 64-bit int to a
float (as above with kcountsize), so it wouldn't be surprising if
that's buggy.


More information about the svn-src-all mailing list