This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC - Add a faster way to read the Time Base register
On Tue, Feb 14, 2012 at 05:10:49PM -0600, Ryan S. Arnold wrote:
> On Tue, Feb 14, 2012 at 4:53 PM, Richard Henderson <rth@twiddle.net> wrote:
> > On 02/14/2012 02:33 PM, Ryan S. Arnold wrote:
> >>> > Is there a good reason why you're stringify-ing this constant
> >>> > rather than just writing "mfspr %0, 268"? ?You certainly don't
> >>> > want to be polluting the namespace with an unadorned "STRINGIFY".
> >> We didn't want a naked (non-descriptive) opcode parameter. ?There must
> >> be a way to do this that takes the definition as a variable, like
> >> perhaps the following (totally untested) code:
> >>
> >> ? ? __asm__ volatile ( ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
> >> ? ? ? ? ? ? ? ? ? ? ?"mfspr %[tb], %2\n" \
> >> ? ? ? ? ? ? ? ? ? ? ?: [tb]"=r" (__tb) ? ? ? ? ? ? ? ? ? ? ? ? \
> >> ? ? ? ? ? ? ? ? ? ? ?: "i" (SPRN_TBRL) ?);
> >>
> >>
> >
> > Why didn't you want this? ?Certainly that's what hp-timing.h does.
> >
> > And why expose SPRN_TBRL at all? ?It doesn't really do the user any good.
>
> Actually, you're right. I was thinking of myself as the maintainer,
> and not of the actual users who doesn't need that information.
I'm modifying the patch.
Thank you,
--
Tulio Magno