[PATCH] PowerPC - Add a faster way to read the Time Base register
Ryan S. Arnold
ryan.arnold@gmail.com
Tue Feb 14 23:12:00 GMT 2012
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.
Ryan S. Arnold
More information about the Libc-alpha
mailing list