Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jul 2010 18:16:38 -0400
From:      David Schultz <das@FreeBSD.ORG>
To:        Marcel Moolenaar <xcllnt@mac.com>
Cc:        svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, Marcel Moolenaar <marcel@FreeBSD.ORG>, src-committers@FreeBSD.ORG, Bruce Evans <brde@optusnet.com.au>
Subject:   Re: svn commit: r209604 - head/lib/libc/gmon
Message-ID:  <20100702221638.GA31280@zim.MIT.EDU>
In-Reply-To: <79DD181D-3885-45F5-9E9D-753553D19891@mac.com>
References:  <201006300140.o5U1eQVG097566@svn.freebsd.org> <20100630184517.B51465@delplex.bde.org> <79DD181D-3885-45F5-9E9D-753553D19891@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100702221638.GA31280>