For things that do mftb with high frequency, maybe you should also add a builtin that does just an mftb, i.e. returns a 32-bit result on 32-bit
implementations.

Are you thinking in a function that returns only the TBL?

On 32-bit, just TBL; on 64-bit, the whole TB (there is no machine
instruction to read just TBL on 64-bit, so it doesn't make much
sense to have it return a 32-bit number).

It sounds like you are asking for an additional interface for
high-frequency events that only reads one register on both PPC32 and
PPC64.

Yes.  A builtin only makes sense for measuring very short intervals;
the builtin is quite a hassle (the timebase is not part of the UISA,
and as we see it actually differs a lot between implementations), and
there is no advantage over having it in some library if you're
measuring big intervals.

  I do not believe that interface currently exists for PPC in
GLibc

Does glibc implement the timebase thing at all?  I lost track of
those patches.

and that seems out of the scope of this patch.  It could be a
nice feature, but it's a new feature request that is not necessary for
this round of patches.

Sure; on the other hand, it seems simple enough to implement.  It
was just a request.


Segher

Reply via email to