[PATCH] PowerPC - Add a faster way to read the Time Base register
Ryan S. Arnold
ryan.arnold@gmail.com
Thu May 10 17:45:00 GMT 2012
On Fri, May 4, 2012 at 3:55 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> +The current guidelines are:
>> +@itemize @bullet
>> +@item
>> +If the header provides features that only make sense on a particular machine
>> +architecture and have nothing to do with an operating system, then the
>> +features should be provided as GCC builtins.
>
> You state this as a guideline but then this very change violates the
> guideline, as __ppc_get_timebase has nothing to do with an operating
> system. So what's the rationale for this being implemented in libc
> rather than as a GCC built-in? I'm not especially arguing that it
> shouldn't be added to libc. But the documentation claiming to provide
> general guidelines should not advise something contrary to what you're
> actually doing. So if there is good reason to have this in libc
> rather than only in a GCC built-in, then the guidelines should cover
> the situation clearly.
Hi Roland,
We'd like this feature in GLIBC until such a time that it becomes
generally available in GCC as a built-in function.
It was agreed by Michael Meissner that this feature was probably best
suited for GCC.
So Tulio is working on the GCC built-in function as well. Even when
he finishes it, if it gets committed it may still be quite some time
until this feature becomes available to general users.
So if the text needs to be changed to reflect that intention, then it
should be changed.
Yes in a perfect world I guess we'd just wait until the GCC support
was available but something like this is VERY useful immediately and
it isn't an ABI concern so...
Ryan S. Arnold
More information about the Libc-alpha
mailing list