This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] PowerPC - Add a faster way to read the Time Base register
- From: "Ryan S. Arnold" <ryan dot arnold at gmail dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>, libc-alpha at sourceware dot org
- Date: Thu, 10 May 2012 12:44:50 -0500
- Subject: Re: [PATCH] PowerPC - Add a faster way to read the Time Base register
- References: <20120412200200.F12DA2C07B@topped-with-meat.com><firstname.lastname@example.org><20120504205556.6A3CE2C070@topped-with-meat.com>
On Fri, May 4, 2012 at 3:55 PM, Roland McGrath <email@example.com> wrote:
>> +The current guidelines are:
>> +@itemize @bullet
>> +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.
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