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 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.
r~