This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCHv2] PowerPC - Add a faster way to read the Time Base register


On Wed, Feb 22, 2012 at 12:49 PM, Tulio Magno Quites Machado Filho
<tuliom@linux.vnet.ibm.com> wrote:
> Add function __ppc_get_timebase() to directly read the Time Base register.
> This is required for applications that measure time at high frequencies
> with high precision that can't afford a syscall.
>
> 2012-02-17 ?Tulio Magno Quites Machado Filho ?<tuliom@linux.vnet.ibm.com>
>
> ? ? ? ?* sysdeps/unix/sysv/linux/powerpc/sys/user.h (__ppc_get_timebase): New
> ? ? ? ?function definition.
> ? ? ? ?* sysdeps/unix/sysv/linux/powerpc/Makefile (tests): Add
> ? ? ? ?test-gettimebase.
> ? ? ? ?* sysdeps/unix/sysv/linux/powerpc/test-gettimebase.c: Test for
> ? ? ? ?__ppc_get_timebase() to catch future ISA opcode/insn changes.

I have nothing to say about the code itself, and I understand the
reason for wanting these kinds of snippets in user.h on glibc since
all users can use them immediately.

However, I guess my question is as follows, and please stop me if I'm
completely wrong, wouldn't it be better to add this kind of routine to
the Power ABI and export it via a different header?

ARM seems to have worked hard to add all sorts of useful routines to
their ABI via the set of __aeabi_* functions. Users can now rely on
them to do real things.

In the grand continuity of good and bad code: is this patch just a
temporary solution?

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]