[PATCH] PowerPC - Add a faster way to read the Time Base register
Tulio Magno Quites Machado Filho
tuliom@linux.vnet.ibm.com
Thu Feb 16 18:21:00 GMT 2012
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
More information about the Libc-alpha
mailing list