penguinppc.org

penguinppc.org

glibc 2.16, released in June, includes this gem: a __ppc_get_timebase() function, which gives Linux applications a convenient way to access PowerPC's low-overhead time counter. The special timebase register has always been directly accessible from userspace, but previously developers would need to go re-type assembly language out of the PowerPC architecture manuals in order to use it.

Another example of the toolchain providing helpful convenience functions came way back with gcc 4.1, which implemented an architecture-neutral set of atomic memory access functions. In the bad old days before that, programmers who needed atomic memory operations had to translate load-link/store-conditional instructions from the PowerPC architecture manual into gcc inline assembly.


Of course, this new glibc function returns only "ticks", not time, so applications won't have a convenient way to relate that to time until __ppc_get_timebase_freq() arrives in the next version of glibc...

http://penguinppc.org/

Write a comment

Comments: 0

This is the sidebar.

Contact

 

This section is visible on every page of your website. The sidebar is a great place to put important information like contact details, store hours, or social media links. If you build an online store, the shopping cart will appear here.