Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jun 2010 22:09:55 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        xcllnt@mac.com
Cc:        arm@freebsd.org, yanefbsd@gmail.com, marcel@freebsd.org
Subject:   Re: svn commit: r209604 - head/lib/libc/gmon
Message-ID:  <20100629.220955.926703890692696643.imp@bsdimp.com>
In-Reply-To: <F642907C-9545-4DD4-9519-DEE245B012F6@mac.com>
References:  <3E9AF18F-9404-49A8-A3A6-CB1F8CF06A80@mac.com> <20100629.210549.175946041797646353.imp@bsdimp.com> <F642907C-9545-4DD4-9519-DEE245B012F6@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <F642907C-9545-4DD4-9519-DEE245B012F6@mac.com>
            Marcel Moolenaar <xcllnt@mac.com> writes:
: 
: On Jun 29, 2010, at 8:05 PM, M. Warner Losh wrote:
: 
: > In message: <3E9AF18F-9404-49A8-A3A6-CB1F8CF06A80@mac.com>
: >            Marcel Moolenaar <xcllnt@mac.com> writes:
: > : 
: > : On Jun 29, 2010, at 7:37 PM, M. Warner Losh wrote:
: > : 
: > : > In message: <14807AD0-2BC9-4FF1-9C2B-9E47FA2F9A41@mac.com>
: > : >            Marcel Moolenaar <xcllnt@mac.com> writes:
: > : > : 
: > : > : On Jun 29, 2010, at 6:48 PM, Garrett Cooper wrote:
: > : > : >> Modified: head/lib/libc/gmon/gmon.c
: > : > : >> ==============================================================================
: > : > : >> --- head/lib/libc/gmon/gmon.c   Wed Jun 30 01:10:08 2010        (r209603)
: > : > : >> +++ head/lib/libc/gmon/gmon.c   Wed Jun 30 01:40:25 2010        (r209604)
: > : > : >> @@ -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;
: > : > : > 
: > : > : > Hi Marcel and Warner,
: > : > : >    Should this perhaps be properly expanded to other architectures,
: > : > : > like arm and mips? I'm not sure if we have a FP emulator on FreeBSD or
: > : > : > not like Cavium does on Linux.
: > : > : 
: > : > : Yes, this can be expanded. I opted for a conservative commit to
: > : > : see what the general response to this commit would be.
: > : > 
: > : > My response: "Why doesn't the soft floating point make this
: > : > unnecessary?" and "What about G4's and G5's that have floating point?"
: > : 
: > : See the commit log: it's most likely a problem with the expression
: > : or with the compiler in dealing with the expression.
: > 
: > That's a little vague.
: > 
: > But it does suggest that arm and mips won't have to worry.
: 
: No it doesn't. In fact, profiling on ARM shows the same problems
: that I just fixed on PowerPC. It's best that people validate MIPS
: before dismissing this as a non-issue.

Then I don't think this is just a simple compiler bug, but something
more fundamental.  the softfloat stuff should make this unnecessary.

Warner



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